|
Luc Pattyn wrote: you can always use myContainer.Controls(index)
true if they are the only controls in that container otherwise it wastes resources putting invisible frames under groups of controls
|
|
|
|
|
If you have that many identical controls, maybe you should be adding them through code instead of copy-pasting in the designer. Do that, and you can add them to a collection (Or even build a dictionary or tree if you get bored) at the same time.
You could even create the first one of each "array", then do something like this, off the top of my head:
Public Function CreateLotsOfStuff(FirstItem as Control, NumberToCreate as Integer) as List(Of Control)
Dim ctlList as New List(Of Control)
Dim previousItem as Control = FirstItem
For x as Integer = 0 To NumberToCreate - 2 'First one's there already
Dim c as Control = previousItem .Clone()
ctlList.Add(c)
previousItem .Parent.Controls.Add(c)
c.Top = previousItem.Top + previousItem.Height + 5
Next x
Return ctlList
End Function
(Haven't done any VB lately, only C#, so my syntax may be a little off)
|
|
|
|
|
Hi
Ever body How to find Particular Drive to the filename i have Temp.txt in my system but i need now
which drive i do know so how to find in my vb6 application or vb.net application with windows
search i need my application only like a windows methods
|
|
|
|
|
I think you are probably looking for one of these[^] methods.
It's time for a new signature.
|
|
|
|
|
dear all
how to use compare in vb 6? thanks a lot
|
|
|
|
|
What do you want to compare?
Objects, strings, numbers, give us a clue!
|
|
|
|
|
i want to compare 2 decimal value(0-255)
|
|
|
|
|
As in ;
Dim a as byte: a = 34;
Dim b as byte: b = 20;
if a > b then
msgbox("a is greater than b")
elseif a < b then
msgbox("a is less than b")
else
msgbox("a equals b")
end if
You cannot get any more basic than that! Surely you could have found out how to do that in the docs or on google.
|
|
|
|
|
sorr, probably i made a mistake, i mean how to use "Compare" to compare 2 deccimal values; for example:compare = int(251 and 4)
|
|
|
|
|
???? I am comparing them, are they greater, less than or equal to other.
So i am not exactly sure what you are on about now.
|
|
|
|
|
you already asked and got answers two days ago.
I suggest you buy and study an introductory book on VB.NET
|
|
|
|
|
Damn, if I had bothered to check his previous messages I would have seen this, and wouldn't have responded with what I had. I see what he is on about now!
*kicks self in @rse*
|
|
|
|
|
thanks sir, i knew this point, but that answer is not what i want. i just want to know after compare..what is result? the result is greater value or less value? i searched online and asked someone already. so still couldn't find solution.
|
|
|
|
|
the result of a comparison is a boolean value, i.e. either true or false, and not a number nor anything else.
Now do yourself a favor: go buy a book and study.
|
|
|
|
|
hahahahaha, i think you also need to buy this book to study hard, although my ability in vb6 is really limited, but i don't agree compare can only get boolen.
|
|
|
|
|
Actually, YOU do need to buy a book and study something called "binary math". Camparing something is usually a boolean result. But, in your simple example "compare = int(200 and 4)" this results in a binary AND operation on two values, resulting in a third value that is assigned to a variable called "compare".
|
|
|
|
|
I am creating a main menu form in Access 2007. I want to use 3 graphics as logos on this form.
I want one to be aligned to upper-left (it is horizontally extended with stripes to stretch across). I also want 2 other graphics to be aligned in the upper-RIGHT of my form (two graphics that occupy equally square areas).
I am making this main menu form to FILL the area of Access, so when I resize the Access window's containing frame, the logos will adjust accordingly.
Is this possible? How can i do this (Use the Header area? Use the form's Picture property? Unbound object? Depth, Z-order?)
Thank you.
JJM
|
|
|
|
|
You'd probably want to find a forum dedicated to Access to ask this question. Everything you're asking is very specific to the behavior of Access and not how to interact with it using VB/VB.NET.
|
|
|
|
|
I am having an issue where suddenly I am getting a file not found exception when populating a picturebox.
Private Sub loadimage(ByVal strImage As String)
If isOnline Then
Me.ToolTip1.SetToolTip(Me.pbMain, strImage)
End If
Try
Me.pbMain.Image = Image.FromFile(strImage)
Me.pbMain.SizeMode = PictureBoxSizeMode.StretchImage
Catch fn As System.IO.FileNotFoundException
pbMain.Image = Nothing
End Try
End Sub
The pain of the thing is that if I can navigate to the file through Explorer using the value of strImage, it just won't load on screen. This has always worked previously, I am not entirely sure why it won't work now.
To top it off, it works fine on my development machine, so it is tough to track down why it is happening. Thoughts?
|
|
|
|
|
eddieangel wrote: Thoughts?
Lots of them. I could ask one hundred questions, but I won't.
It is up to you to provide more information about your app, the problem frequency, the value of strImage, the history of that file, etc.
BTW: don't swallow exceptions, have Exception.ToString() logged and study it!
|
|
|
|
|
I thought there might be a quick answer that I was not aware of. This process in this application has worked indefinitely. The value of the strImage is UNC path (\\fileserver-01\images\201001010001_00000001.jpg)
If I type the UNC path into the run window it pops up. As you can see I specifically catch the file not found exception. I had a message box pop up that printed the value of strImage, and I ran that value through the run window and got the file to pop up, but it will not come up in the picture box.
I do have a logging function, I just took it out of this particular example to try and simplify and isolate the error.
I can't duplicate the issue on my development machine
|
|
|
|
|
so it could be an access privilege problem, your app not being allowed to handle UNC filepaths. Not sure what the right solution is; maybe you could map a drive letter and use that instead?
|
|
|
|
|
I mapped the network drive and am still unable to access anything with the application. My first guess was permissions as well and I am sure that there is something to it, but I can't figure out what. I can access network resources via UNC path or mapped drive using the run dialog, but the same path, UNC or map, does not work within the application. File.Exists(strImage) produces a false result.
It is truly bizzare because it still works on my machine, and another machine that I just loaded yesterday, but it does not work on several other machines. Environmentally speaking, they are all over the board with operating system and patch level, and there is no commonality between the machines that do work. One is Windows Vista Home and one is Windows 7 Professional. However, six other machines with Windows Vista Home do not work.
Beyond that, if it were a straight permissions issues I would expect an IO exception as opposed to a FileNotFound. It is all very vexing seeing as how this application has worked and been stable using these same parameters for more than a year only to start freaking out now.
I want to blame Microsoft, but I doubt that I can.
|
|
|
|
|
Just an idea, without any guarantee:
there is a tool called " .NET Framework XXX Configuration Tool " (file: Mscorcfg.msc) where XXX is the .NET version;
the tool came installed with 1.0 and 1.1; for later versions it would be part of the SDK (which you need to install separately).
Not sure there is one configuration common for all Framework versions (i.e. only the tools evolve), or configs are individual (tools and data are separate).
Functionality includes:
- security (adjust zone security, increase assembly trust)
- configure individual applications (?)
More here[^]
|
|
|
|
|
I configured the application using the tool as outlined. I increased the assembly trust for the application to full trust but it yielded no results.
The crux of the issue appears to be that the application just doesn't even see that the file exists. It worked fine up until two days ago with no changes, I am wondering if it got zapped with an update. Either way it is crippling my application and making me crazy.
Thanks for all of your insight, hopefully I will be able to isolate the issue on other computers.
|
|
|
|