Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Help With Moving Things In Arrays


Hey people.

Here is my problem.

I have an array of a size 10. Anyway i want to know how to delete and item in the array and move every item in the array down one so that it fills the empty space. So that I have no empty spaces in the middle of my array only at the end of it.

I have puzzled on it for ages.

Any help would be aprreciated.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Moving Things And Deselecting Things.
Okay, I have two questions. First I'll give you the noobish one. How do you deselect something like a command button so it's not highlighted? I also have a problem with my end of the year project I asked for help with a while ago. I'm trying to make it so that when you click a button, the notes on a measure (of music) move down to the next set of lines instead of going to the right off the screen. It's hard to explain, but here's the code for the command button:

VB Code:
Private Sub Command1_Click()intOMG = intOMG + 1If intOMG > 8 Then    Command1.Enabled = FalseEnd IfLine1(Line1.lbound + intOMG).Visible = TrueLine2(Line2.lbound + intOMG).Visible = TrueLine3(Line3.lbound + intOMG).Visible = TrueLine4(Line4.lbound + intOMG).Visible = TrueLine5(Line5.lbound + intOMG).Visible = True End Sub


Here's a picture of the form, which is probably the best way I can show you:

http://img.photobucket.com/albums/v6...r/untitled.jpg

Also, how can I make that scrollbar work? This should be my last question about my project (seeing as it's due tomorrow), so thanks to those who help.

Moving Things*
Ok, i have a shape that moves across the form (looping)

i have a timer that subtracts 10 out of the shape.left every 1 sec. from time to time i want to change the speed of this, like (-20) (-30)
etc......
so far i tried the following

Yellow1.Left = Yellow1.Left & Text1.Text

Obviously this did Not work, lol.
Does anyone have any better suggestions on accomplishing this? Thanks

Moving Things Between Frames
How do i move for instance a label between 2 frames? i tried with label1.container but that didnt work very well, so i guess thats not what its used for or im doing something else wrong.

Moving Things Into Tabs
i have a bunch of labels and text boxes that are in a form. i just discovered the tab function and when i try to move them into the tab they just end up going underneith. how do u get them to go on the tab?

Moving Things From One Listview To Another
Hey guys I have one listview called report on a form call antivirus. This listview has checkboxes.

I have another listview with no check boxes on a form call resuls.

What I would like to do is when an item or items is checked, whatever is in the first column of the report listview on the antivirus form goes in the results listview on the resuls form. The same as the second column, I would like that repeated as well.

But the twist is if the user checks a problem and then presses the delete button. I would like the 3rd column of the results listview on the resuls form to say "Deleted" for that checked item.

OR if the user checks a problem and presses ignore then it would just say Ignored by the item in the 3rd column.


Can anyone tell me how I could do all that?

Thanks!

Need Help With Timers And Moving Things
I'm trying to use a timer that every time it refreshes, it will move the image up a little till a certian point then move it back this is the basic part if some one can answer this for me then i'll ask my next question.

Moving Things From A Listview To A Textbox?
Hey guys I have a listview called report and it has check boxes. I have another form called form2 with a text2.text.

Is there a way when I check one item and press a button that checked item goes in the text2 of the form2?

Its just the item from the first column of the report listivew.

Thanks!

Arrays And Things
I'm makeing a game in VB. Trying to keep it simple its an RPG. Its like a text based game with grafix, but bad ones. Anyway i came up with this idea for a grafix engin/movement thing where you have a 2d array and you increase and decrease the values of a variable to tell the program where to draw the charecter and every other space is seen as floor. The only problem is i really dont know anything about VB or how to do that. Could anyone make seince of that? here:

var position
array (x,y)

if position = array[x,y]then
draw char.gif
else draw floor.gif

basicly something like that that is actual code would really help me out.

Edit: Moved from General

Cool Things~Any Body Teach Me How To Control The Mouse Moving By Typing The X And Y?
I would like to know if anybody know how to controal over a mouse by using typing the x and y it will automatic go to the direction and i press cmdleft
button it will click on the define object and i press cmdright it will also will virtual what the mouse do with the right click.
x and y is the destination.

Moving Arrays
how can move an array of images at one time, the same amount of spaces? (i know i need a timer, but how do i MOVE them)

for example, say i have 2 variables,

badguyx(10) and badguyy(10)

how to move?

[IMG]c:freddie2.gif[/IMG]

Moving Fixed Arrays
I have a array.

Dim oldX(2000, 5), oldY(2000, 5)

I want to move it.. like this.. but I dont know the
way to code this (without a for loop)

For a = 1 To 5
oldX(All, a - 1) = oldX(All, a)
oldY(All, a - 1) = oldY(All, a)
Next

Moving Objects In Arrays (vb.net)
This is probably a stupid question but me and my friend are new to this... Haha.

I'm making some program for class with my friend and we have all these items moving from left to right, then once reaching the edge changing their vertical direction so they are moving from right to left, and then when the reach the edge they move down a bit and then the process repeats using an array. Then, we have a random number select one of the objects in the array whenever the timer reaches a certain number, and move just that item downwards, HOWEVER, we do not want to move the 'selected' item left to right anymore. We want it to stay in the same position that it started moving downwards from. We have tried MANY different things, and we cannot seem to get it to work. All that we have got is the moving downwards of the one object to happen, but for some reason we just cannot get it to stop moving left/right.

We were thinking that it might work if you can remove an object from an array but our teacher said that you can't do that... So yeah... We really are stuck now and are therefore using the weekend to search for a solution!

Any suggestions/ideas are welcome...

I hope this made sense. If any questions or clarification is needed feel free to ask and I'll do my best to explain.

Label Arrays.......Moving Text?
Just wondering if its possible to move text from an array of labels
to another array of labels in a certain order.?
for example, this is what i somehow want to do:

Label1(0).Caption = Label2(0).Caption
but when i try to put this line in as well:
Label1(1).Caption = Label2(0).Caption
only the 2nd line works, does this make sense, and if so how do i do it properly?

Moving From One Form To Another Using Names And Passwords With Arrays?
Im trying to go from one form to another by taking two text boxes, one being a user name, and one being a password..using arrays this is what i have and it works other than the fact... when the user logs in correctly it still shows the msgbox not once but 5 times, and if the information in text boxes doesnt match that in the text file, the msgox comes up 5 times also.. heres the code.... any help would greatly be appreciated!!

Dim nam(0 To 4) As String
Dim pass(0 To 4) As String

Private Sub cmd_login_Click()

Open App.Path & "passwords.txt" For Input As #1
For x = 0 To 4
Input #1, nam(x), pass(x)
If txtname.Text = nam(x) Then
If txtpassword.Text = pass(x) Then
frm_pass.Hide
frm_fgrid.Show
End If
Else
MsgBox ("Incorrect User Name/Password!")
txtname.Text = ""
txtpassword.Text = ""
End If
Next x
Close #1

End Sub



heres whats in the text file:

"Darrell Walls", "walls"
"Neal Webb", "webb"
"Samantha Popp", "popp"
"Todd Chambers", "chambers"
"Thomas Streit", "streit"

Complex Multi-dimensional Variant Arrays Holding Other Arrays (sub-arrays?)
Hi there folks, I have a rather complicated problem on my hands at the mo for which I can't find a solution alone!

I'm currently working on some software for my company to keep a weekly record of the following:

Various receipts (i.e. cash, cheque, card, other & additional information, each additionally entered by the user as a daily total)

Expenses for business stock, recorded per supplier on a purchase by purchase basis

Other various expenses, i.e. motor fuel, phone, light, heat etc. on a weekly basis.

The form to which the above relates to is attached and viewing it would help you understand what I mean.


***Please note, when viewing the form, the project within VB6 should have the component "Microsoft Tabbed Dialog Control" activated in order to view it properly!***


I have already thought of a way to use multi-dimensional variant arrays to store data week by week, which, although I have not yet written the code for, I imagine would be fairly easy to accomplish.

My problem is that I have just purchased one of Microsoft's books on Visual Basic, "Programming Visual Basic 6.0" written by Francesco Balena, which has given me a completely alternative approach on how to deal with the week by week data.

It must be mentioned that although my original method I presume will work fine, MOST of the data (i.e. text boxes if you view my form )for each week will be left blank which is a waste of time and will slow down my application down.

Francesco Balena mentions in his book that an array can also hold an additional array (see page 177, if you have the book, "Arrays of arrays") saving memory for the application.

My original method is to basically create a multi-dimensional array, collecting ALL data for each week, including those which are NIL. A ROUGH example is as follows:

arr(wkNo,DayNo,ReceiptType,)    'ReceiptType as integer
arr(wkNo,ExpenseType)    'ExpenseType as integer

As I mentioned, there will be a lot of memory wasted with this type of array as not every different type of expense will be encountered each week. (I.e. once the array has been created during run-time, there will be a fixed number of entries for each dimension)

Francesco's book mentions an array that can hold an additional array, a sub-array. Something that looks like arr(1)(2) for example.

Although I can roughly grasp the method in particular, I am trying to find out a way how I can create a "sub-array" to deal with the week by week expenses so that they can be stored as need be, but when there is no data to save, then no sub-array is created.

Sorry if the above sounds confusing, but I can't think of any better way to describe what's going on! Like I said, have a look at the attached form!

Complex Multi-dimensional Variant Arrays Holding Other Arrays (sub-arrays?)
Hi there folks, I have a rather complicated problem on my hands at the mo for which I can't find a solution alone!

I'm currently working on some software for my company to keep a weekly record of the following:

Various receipts (i.e. cash, cheque, card, other & additional information, each additionally entered by the user as a daily total)

Expenses for business stock, recorded per supplier on a purchase by purchase basis

Other various expenses, i.e. motor fuel, phone, light, heat etc. on a weekly basis.

The form to which the above relates to is attached and viewing it would help you understand what I mean.


I have already thought of a way to use multi-dimensional variant arrays to store data week by week, which, although I have not yet written the code for, I imagine would be fairly easy to accomplish.

My problem is that I have just purchased one of Microsoft's books on Visual Basic, "Programming Visual Basic 6.0" written by Francesco Balena, which has given me a completely alternative approach on how to deal with the week by week data.

It must be mentioned that although my original method I presume will work fine, MOST of the data (i.e. text boxes if you view my form )for each week will be left blank which is a waste of time and will slow down my application down.

Francesco Balena mentions in his book that an array can also hold an additional array (see page 177, if you have the book, "Arrays of arrays") saving memory for the application.

My original method is to basically create a multi-dimensional array, collecting ALL data for each week, including those which are NIL. A ROUGH example is as follows:

arr(wkNo,DayNo,ReceiptType,)    'ReceiptType as integer
arr(wkNo,ExpenseType)    'ExpenseType as integer

As I mentioned, there will be a lot of memory wasted with this type of array as not every different type of expense will be encountered each week. (I.e. once the array has been created during run-time, there will be a fixed number of entries for each dimension)

Francesco's book mentions an array that can hold an additional array, a sub-array. Something that looks like arr(1)(2) for example.

Although I can roughly grasp the method in particular, I am trying to find out a way how I can create a "sub-array" to deal with the week by week expenses so that they can be stored as need be, but when there is no data to save, then no sub-array is created.

Sorry if the above sounds confusing, but I can't think of any better way to describe what's going on! Like I said, have a look at the attached form!

Code For Moving To The First Blank Cell In A Worksheet; Moving Left,right,up Or Down
I have created an application form as a userform in Excel. I need to send the data entered into my text boxes when the program runs to separate excel cells in a worksheet.

My problem is I can use code that will send the textbox entry to a specific cell eg. If my textbox is named Surname I can say

range("a5").value = surname but if I do that when I run the programme to enter the next record for someone else the first record will be overwritten.

I NEED A CODE LINE THAT WILL TAKE ME TO THE FIRST EMPTY CELL AND ALLOW ME TO MOVE DOWN OR TO THE LEFT OR TO THE RIGHT

Moving Balls To Moving Images??
Please take a look at this as it is related to my question
Thread

is it possible for the create images to be an image type that is already drawn?

Multiple Arrays Linked By Their Index, Needs Sorting By Values Of One Of The Arrays
I have multiple arrays that I link by using a comon index..... One of the arrays is a final score. I need the score sorted by value and need the index values in that sorted order so that I can reference the other arrays with that index at the same time..... Any ideas

array example is....

mytext(X), mytext2(x), myscore(x)

Ill have about 30 instances of this and need to rank them by their scores and ba able to reference them by how they rank.
Dan

EXCEL CHARTS AND ARRAYS - WORKSHEET FUNCTIONS AND ARRAYS
I have two questions regarding arrays

1) is it possible to use an array for chart .value, rather than a range - ie I have array in which I have undertaken data processing and simply want to chart the data without having to pass it out back into a worksheet.

2) Can I use range methods on arrays, ie application.function.sum etc etc, on a column in an array - do I need to convert to range -if so how do I do that without writing data back to a worksheet ?


Many thnaks


adam cox

Memory Allocation - Arrays Vs UDT Embedded Arrays
Which will use less memory, a multidimensional array or the UDT which contains an embedded array??

1. MultiDimensional Arrays -- MDArray(10,10, 100)

OR

2. Array embedded in UDT

Dim UDTArray(100)

Type UDT
First As Integer
Second As Integer
UDTArray() As Single
End Type

Finding Row Of An Item In Arrays Of Arrays
I have an arrays of arrays, anarray with 2 rows and 3 columns. I need to know I want to find the row number of a certain item in the array, how can I do that: for simplification I am giving the contents of anarray:

anarray(1)(1) = "id1", anarray(1)(2) = "id2", anarray(1)(3) = 1
anarray(2)(1) = "id1", anarray(2)(2) = "id3", anarray(2)(3) = 2

Now if I want to find the row number of id2, how can I do that?

Dynamic Arrays Vs. Standard Arrays
Quote:Originally Posted by herilane1) What is the difference between declaring an array as an array, and declaring it as a variant? I.e. between
Dim a As String(2)
a(0) = "bla"
a(1) = "blaha"
a(2) = "eek"
and
Dim a As Variant
a = Array("bla", "blaha", "eek")
These are minor differences for VB, but can be a whole different ball of wax in the Excel environment.

Code:
Dim A as String(2) ' Doesn't work for me, I get a compile-time error
Dim B(2) as String ' An Array of Strings, 0..2 or 1..2 depending on Option Base
Dim C() as String ' A Dynamic Array of Strings
Dim D() ' A Dynamic Array of Variant
Dim E ' A Variant, which can easily wrap a Dynamic Array of Variant
So B is a standard Array while C&D are Dynamic Arrays requiring ReDim before being used. These are standard VB concepts. Case E can be ReDim'ed as well and thereby contain a Dynamic Array.

In many ways though, cases D and E are the most interesting. It is only these two situations -- either a Dynamic Array of Variants or a simple Variant -- that can be set to the value of a Range. For example:

Code:
Dim D() as Variant

D = Range("A1:E10") ' Note: NO Set here!!
This is a heck of a lot faster than looping through the cells to paste all the values one by one!

You can now access D(i,j) instead of Cells(i,j) to get the values. If you have to do a lot of looping, etc. you can actually assign the values of the Range to the Array, do the required math, and then pass the results back to the Range (if changes were made) faster than looping through the cells directly!

To assign the array back, you would use:

Code:
Range("A1:E10") = D
(Again, so Set!)

-- Mike

VB 6.0 Help. [2D Arrays, 1D Arrays, Selection Sort]
Hi all, new to the forums..

Basically, my Advanced Higher project is due in a week on thursday and well.. im screwed as it is. I have a couple of problems..

1: I need to sort my program on total race time, which should be held in a 1D array named total(1 to 5). I need to fill each element with the total lap times from 5 different people, eg total(1) should hold the sum of drivers(1,2 to 6). If you understand me...

2: Ive tried to sort the 2d array using a selection sort, but something has went wrong?

Here is the code ive used:


Code:
Option Explicit
Option Base 1

Dim Drivers(5, 6) As Variant
Dim highest As Integer
Dim lowest As Integer
Dim average As Integer
Dim total(5, 6) As Variant
Dim min As Single
Dim max As Single
Dim driver As Single
Dim time As Single
Dim sorted(5, 6) As Variant
Dim drive As Single






Private Sub cmdExit_Click(Index As Integer)
frmGoKartTimes.Hide
Unload frmGoKartTimes
frmStartup.Show
End Sub

Sub cmdHelp_Click(Index As Integer)
Dim help As String
help = MsgBox("Click on Start to enter names and times for a new race. Click on Results to see the winner of the race and various other statistics Or click on Personal Statistics to see a certain driver's Personal Statistics.")
End Sub



Private Sub cmdRun_Click(Index As Integer)
Dim counter As Integer
Dim message As String
Dim number As Integer
min = 0
max = 90
counter = 1
picSort.Cls

For driver = 1 To 5
For time = 1 To 6
If time = 1 Then
Drivers(driver, time) = InputBox("Please enter the driver's name.", "Drivers And Times")
End If
If counter < 26 And time <> 1 Then
message = "Enter Time - between "
number = validate_value(min, max, message)
Drivers(driver, time) = number
counter = counter + 1
End If

Next time
Next driver

Call Sort

End Sub

Private Sub Sort()
Dim minimum As Integer

For drive = 1 To 5
sorted(1, drive) = Drivers(1, drive)
Next drive

Dim placeholder As Integer
placeholder = 2
Dim person As Integer
For person = 1 To 5
minimum = 2
For driver = 1 To 5
For time = 3 To 6
If Drivers(driver, time) <= Drivers(driver, minimum) Then
minimum = time
End If
sorted(driver, placeholder) = Drivers(driver, minimum)
Next time
Next driver
placeholder = placeholder + 1
minimum = 999
Next person




For driver = 1 To 5
For time = 1 To 6
picSort.Print Tab(time * 10); sorted(driver, time);
Next time
Next driver



End Sub



Function validate_value(ByVal min, ByVal max, ByVal message) As Single
'Validate input to be integer in range min to max

'Dimension local variables
Dim number As Single

'Start loop

Do
number = Val(InputBox(message & min & " and " & max & " seconds", "Validate"))
If (number > max) Or (number < min) Or (number <> Int(number)) Then
message = "You must enter an integer between "
End If
Loop Until number >= min And number <= max And number = Int(number)
validate_value = number

End Function




Any help is appreciated,

Thanks,

-Comacchio

2 Things
Didn't want to make two posts, but I have 2 questions:

How do I make my program check for a certain file, create it if it isn't there, if it is then add the specified text to the bottom?


Second question:

How do I make tabbed panels?

Thanks in advance

All The Things...
hi, i'm new to vb and i'm new here too.. :-)
i know some questions a lot of people are asking, but i'm asking too.. lol lol, so here goes, i know you all !experts! out will help

Custom-Shaped:
1) How do I make 'Not only it is custom-shaped form' but the edges are
smooth? Is it something like Anti-Aliasing? I saw Winamp3 with this feature.

2) So i mean 'not only it is custom-shaped' but the edges are 'smooth', is it doned by using PNG-24?

Flash:
1) How to integrate Flash into VB?

Others:
1) How does DirectX helps with transparency?
2) How do i deal with animation? Something like 'Ashampoo Media Player' where the 'blue liquid' just flows.. (i think)

I'm not good at VB so i hope everyone can help! :-) Thnx and much thnx!

Two Things At Once?
I have my game loop set out something like this.


Code:
While brunning
DoEvents
Cls
Call Draw_Screen(Me)
Call Artificial_Intelligence(Me)
Call Collision_Detection(Me)
Call Update_Positions(Me)
Wend

and within my AI sub i have these.


Code:
Call AILongVision(FrmUser)
Call AIThreat(FrmUser)
Call AIShortVision(FrmUser)
Call AIWorkPath(FrmUser)

and within my AILongVision sub i have the code that works out my AI's long vision and all that stuff. and when something within the sub is triggered it calls another sub which draws some stuff on the screen using a while loop.
the problem is that when this loop gets called the whole program freezes until this loop finishes. how do i let it keep rendering my game while doing this loop?

About Some Things...
Hello, again my post got deleted or something, im making a shape shootout game with of corse shapes. i have two squares that are going to shoot lines at eachother, its really basic. but now to my question, i want to know how to make it so if the red line touches the shape in anyway then the shape is no longer able to move and it dissapears. can you help?

Using My Db For Other Things
Hi everybody,

I''m making a program in which you can print document but some documents require to be printen with Word. My Database (an access file)
is used with this. The word document requires data from the database how can i open my word file in word with al the data filled in ?

The Best Way To Do Things?
Alright first thanks to everyone who has chosen to help me on my quest to make things more simple K.I.S.S. Anyway, This is a question I hope to dialog on. I'm trying to speed up a proposal process by adding access database support to an excel template. I need to dump some data across several cells depending on the criteria selected in one of two dropdowns in excel. So far I'm querying the DB with ADO and dumping the results into a xlVeryhidden sheet. My logic so far is to have two tables tblBrand and tblProduct. Table brand looks like this:

brand_ID, brand_name
1.............BrandX
2.............BrandY
3.............BrandZ
4................

Table Products looks lilke this:

product_id, brand_ID, prod_model, prod_desc, prod_price, prod_retail
1...............2.............ABC123.......cool.........$1500........$ 2200
2...............2.............ABC333.......cooler......$1800........$2 500
3...............1.............XYZ454.......Sweet......$2000........$30 00
4...............4...................

I'm going to populate the first dropdown with the info from tblBrand. This info is being dumped into the hidden sheet everytime the template is opened to avoid having to worry about an inaccurate DB population. I hope to use the dump to fill the dropdown. If the person choses brandX from the dropdown I would like to requery the DB to select all the products with the corresponding Brand_ID like this:

Code:
dim Sql as string
dim BrandID as integer

BrandID = 'First dropdown brand_id value
Sql = "SELECT * FROM tblProducts WHERE brand_ID = "' & BrandID & '""
Hope this Makes sense so far. I program in PHP originally and can do this kind of thing in PHP any day of the week but I don't know VB/VBA that well So... First Question Is this possible?Second Question Assuming first question works. Am I on track with my thought? How would you do it?

Not Sure How To Set Things...
Okay, here's what's going down.... I want to set a small box down into my
DirectDraw screen at 1024x768, and I can't seem to get this done... I have the "FullScreen" initialization and I want it to display, something.... maybe a box rotating 360-Degrees... If you can help, please do... Thanx!!!

Little Things In VBA :)
Hi all! While working with VBA I stumbled on couple things that I didnt like and couldnt figure way around

1. I created an application in VBA... so when I start it, the Exel workbook loads my first userform. My problem is that this workbook is always in background... its not like workbook has a .Hide method How do I hide it?

2. Is there an elegant way to add 1 to variable? (like i++ in C/C++)

3. Is there any way to export VBA application into independant .exe file?

4. How to get out from While ... Wend?

I cant think of anything else right now... maybe ill remember later
Any help is always greatly appritiated. You guys are real pro's

Two Things
1) Is there any way to change the caption of a command button or is putting a border on a label the only way?

2) How can I take away the top bar, or more importantly, the minimize, restore, and exit buttons in the top right hand corner? The exit button at the top doesn't fully exit my form, mazimizing it makes the program look all weird, and the minimize isn't needed for me.


Thanks!

2 Things...
I'm sure the answers to these questions are here somewhere, but I can't find them... So Here Goes.

How do I make a Cancel Button interrupt a program, while it is querying a remote machine?

And

How can I make the Return Key action the program after entering text in a field? I have to click a button and would love the Return key to do this.

Thanks.

2 Things
OK, 2 things,

1 How do you use the Rnd funtion?

2 How do you create global variables?

3 Things
I am nearly at the end of my current project now, however i have a few remaining problems that i just cant work out.

1. Multiline textboxes - IF i have a scrollbar, they always seem to stay scrolled to the top whenever the text changes. Is there a way to keep the text box scrolled down to show the last entry into it?

2. Automatically detecting if they have disconnected from the internet- Is this possible?

3. An annoying little problem using the shell command. -

My app is a program that runs along side a game, however if i use thr shell command then in the game some things (like key mapping, mouse sensitivity etc) are reset to the default.

Im sure its a prob with using shell() because if i run the game manually by clicking the exe there is no problem - even when the app is running. Any possible ideas to this?

Once again thanks in advance.. im so close to finishing yet cant release it until these little niggles are sorted out.

David

Few Things
how can i make a button open internet explorer?
how can i put the lines in the menu editor like there is in internet explore file thing between save as and page setup
how can i make a *.cur or a *.ico to use as an icon for my program - what program and where can i get it

Two Things.
When I double click on a label, I want to save the name of the label to a variable.

Then I want to use this variable to change several properties of the label, such as caption and background color.

Essentially I'm trying to develop one piece of looping code, instead of pasting and changing the code 42 times for each label and combo box. I declared the variables as label, but I don't know how to get the name from the program.

I tried setting the variable to the label name, just to test the rest of my code...but that wouldn't even work. It said "with object variable or block variable not set" I tried changing the variable type to a string, and it said "invalid qualifier" when I tried to use it as a control name.

Any ideas?

Few Things
Im Pretty New To VB, I have been reading tons of stuff on it and reading this forum has been helpful, but i would like to know a few things.

Im trying to make a unique key for a system that will be unique to that system, so i figured i would encrypt the computer name... but i dont know how to identify the computer name if somebody could help me with that.

And something that may be simple im not sure, how to return a random letter, i know about numbers but not sure about letters.

Any help would be appreciated.

A Few Things I Could Use Some Help With &gt;&gt;;
Well i have a few questions...

I want to have my form/program hold down a key when a check box was ticked. then it would stop when Un-ticked.

Then,

How would I make it so when you click on a menu item it opens up a webpage or an email application to email something/view a website?

Thanks,
Daerd.

How Can I Do These 2 Things...
Totally unrelated but how can i do them...

1. Let my program connect up to the internet and save a file on the site so then they can load it later? This would probably have to include an accounts system.

2. Make it work with a webcam so maybe like one of those webcam games where you can move and then virtual things can bounce off you?

A Few Dll Things...
Gwah... well... im trying to make an anti-software cracking system sorta thinger...

I've got my DLL written with all of its functions... and i was wondering if i could inject the dll into another process (lets say explorer) and then call a function from it? the main thing that i want to see is if its even possible O_o

thanks =]

A Few Things
Ok, I have a few questions, I thought this is the best place to ask, since this place rocks!

Ok, well, First i seen another post like this, bu not sure it it would work, but first I want when my program (Radio program again) opens, It checks right away if theres a connection to the host, If so then it leaves the program be, if it returns that it cant, give a message saying that well it cant like " Sorry, no DJ at this time "

Second, i am going to search the forums and try this one on my own, but if its ewasy tell me, its for adding items to a combo box.

That will about it untill I get this little bit done.

How Can I Do The Following Things
Hello Everybody :
I am a new member here and I really found many important codes and DLL(s) here but I have some questions that I hope I can find the answers of it Here :

Note : I ve searched before writing my topic so please forgive me if I couldnt
find the answers while I was searching :

1 - How can I Insert a PNG Image in VB 6 ? Is there any ocx , code , dll allows me that because
We are all knows that the PNG Image is not available to add in VB 6 ?

2 - Is there any .DLL that allows me to save with all images extensions ?

3 - How can I search for a word in the text in the RichTextFile and make a replace ?

Soooorry for the long questions but i really need the answers

Regards
Black Wolf

Am I Doing Things Right?
Hi fellow VB Gurus,

I'm very new to VB6, but at my new job I have to use it. I'm just wondering if I'm doing things right:

The project I'm working on consists of several subprojects with selfmade ActiveX controls (ocx) or ActiveX exe's. The way my business partners build the whole project is by compiling the changed components and compiling all the components or projects that depend on those components, MANUALLY !?!. My problem is I'm very lazy and I want to make some kind of build script that make the right references automatically so I can compile the project and all subprojects unattended. Is there anybody here who had to build such big projects b4 and who knows a good way to do it nice and quickly? I already know about the command line compilation with the /MAKE argument, but that's all so far. Does VB6 automatically reference the latest version of the ActiveX components? Any other information you can give me?

Thx in advance,

RaKKeR

Its The Little Things That Bug Me !
I've compiled a project that has a magnifying glass as its icon.

The project contains 2 icons (in a resource file), a house and a magnifying glass.

When I go into Project Properties the house icon is displayed ... which is good.

When I compile the project the icon for the .EXE becomes the hourglass icon ... which is bad.

I tried deleting the .EXE and recompiling, thinking it may inherit something ... but no.

I know this is petty .. but its bugging me ....

Why Do M$ Do Things Like This?
Versions 8 ('97) and 9 (2000) of Excel allow the custom number format 0.0kg but in version 10 (2002/XP) you have to format it as 0.0"kg" - why on earth would they change a thing like this, and doesn anyone know a sensible workaround for my VB app that uses Excel objects?

Help With Few Things Please
Hey,there as you can i see im new here,well im making a big prog were you can do afew things, and id like to see the codes for few things!,thanks in advanced

1.changing clock time
2.setting C:/ as a ftp
thanks ppl

3 Things Together
Ok I have 3 text boxes and if any 1 of them at all is blank I want a message box to pop up but how do I make all 3 go together... I tried If Text1.Text & Text2.Text & Text3.Text ="" Then MsgBox but it has to many &'s in it so how do I put them all together for this to work? Thanks for the help guys

Copyright © 2005-08 www.BigResource.com, All rights reserved