|
hum.. i couldnt find in the form the "designer"..
and in visual basic express edition 2005 it doesnt know this.close() argh.. really cant find it!
|
|
|
|
|
Having opened the form in Visual Studio, hit F4 to get the properties taskpane showing. Set ControlBox property to False.
Oh, and he meant Me.Close() .
this.Close() is C#.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
in the properties of the form, you want to remove set the controlbox property to false, this will also remove mina nd max buttons, you can't remove Close button individually...not that i'm aware of?
The code convention for refering to the form in code in vb.net is me not this (which is C#).
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
I have a panel on my form that is docked with a gradient image on it. I then have a group box on top of that with some objects in it. How can I get it so that the image on the panel object shows thru the group box....or at least get the image to form all the way around the group box. It seems like where the text is for the group box, it still shows the system colors.
Any suggestions?
Thanks
Tom Wright
tawright915@gmail.com
|
|
|
|
|
Unfortunatly the 'Transparent' backcolor setting for controls just gives you the same single backcolor as the Form the control is on. So normally you would not get gradient Image to show at all.
However, you could override the Groupbox paint events and work out which bits of the image need to be painted under it, and paint them manually.
If the Group box is in a fixed position I would suggest just pasting the appropriate bit of the gradient image into the group box background image.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
You know for half a day it did not click with me what you said.....until now. So I set the background image property of my main form and ala peanut butter and jelly sandwiches.....the group box was filled in exactly like I wanted it too.
Thanks for the help
Tom Wright
tawright915@gmail.com
|
|
|
|
|
I'm working on (someone else's) VB6 code, and they're using the following variable names
Char
Module
These also appear to be keywords in VB6. Does it really allow you to do that without complaining?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Yep. Not the most brilliant thing to allow in code, but it's perfectly legal in VB6.
|
|
|
|
|
Any sort of work in VB6 is bound to provide several WTF moments. VB6 is just like that.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Any sort of work in VB6 is bound to provide several WTF moments.
So true. Care if I use this as a sig?
|
|
|
|
|
Hi all,
In Vb2005, I need to develop a program that sends alphanumeric sequences to a device. These sequences have to be random and must not repeat any previous one done during the same day. I cannot store the used sequences, neither in disk nor in memory.
Any idea on how to do that?
thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
You haven't said anything describing these "random sequences". How long are they? Variable length? What are the legal characters? Any illegal characters? Does if have to be in a certain format? Can the sequences be patially similar to previous ones in the same day? (Like "these" and "this")
You're going to have to "remember" the sequences somewhere to make sure that you don't use the same one twice. "Random" doesn't mean "unique" acrossed the set of available numbers.
|
|
|
|
|
Hi Dave,
these random sequences have to be 6 digits long and composed using 0 to 9 and A to Z characters.
The intention was to make an alphanumerical counter but we want something more elaborated that seems a random number.
I was thinking to use an encrption algorithm where the string to encrypt shoud be the counter. By this way I shouldn't have to store the strings already done and I just have to store the actual counter value.
Thanks,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
You could do this, but ANY RNG can generate the same sequence of characters somewhere down the line, however unlikely it may seem.
RNGCryptoServiceProvider Class[^].
|
|
|
|
|
Hi again,
as I said I don't really need a random number, I just need a unique 6 digit number that it seems random, so, do you a encryption wrapper class that takes a 6 digit counter and encrypts it to a 6 digit alphanumeric string. That would do the job, but I don't know which one does it!!
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Hi Marc,
The first thing that comes to mind is to make use of Now() . Whenever you call it, it will give you a different value, and it will never ever repeat.
You could for example use its .Hour , .Minute and .Second parts, and replace leading zeros with a random letter from A to Z.
Alternatively each datetime is a number as far as the computer is concerned, and will also nerver ever repeat, so you could use that in some sort of algorithm or formula.
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
I need to add escape characters to a VB string but I get errors.
The string needs a double quote, and an asterisk
ie. "this is the string \" \*"
Problem is, this isn't working...something about a type mis-match.
Any ideas?
|
|
|
|
|
To do double quotes, you have to use two of them to escape it:
Dim stringWithDoubleQuotes As String = "This is a ""test..."""
The contents of the string will be This is a "test..."
|
|
|
|
|
I need to be able to label the tick marks on a Trackbar (slider) control in a VB.net 2005 Windows applaction. The labels need to be centered under each tick mark. For example, if a Trackbar has five tick marks, I would like to number/label them "1", "2", ..., "5". The number of tick marks will very dynamically during run time. Thus, the labeling must be dynamic. Also, the Trackbar is anchored Top, Left, and Right. When the Trackbar is resized, the label should be repositioned under their respective tick marks.
Rob True
|
|
|
|
|
There is no support for labels in the standard TrackBar control. You'll either have to find a 3rd party control that supports this, or implement your own version that includes this support.
You can find an approximation of a custom TrackBar in this article[^].
|
|
|
|
|
I have following error in window service same code is working in window Application
"QueryInterface for interface SQLXMLBULKLOADLib.ISQLXMLBulkLoad failed."
Dim objbl As SQLXMLBulkLoad3
objbl = New SQLXMLBulkLoad3
objbl.ConnectionString = "Provider=SQLOLEDB.1;Data Source=pcDB;Initial Catalog=webdb;User ID=sa;pwd=sa"
objbl.ErrorLogFile = "c:\error.log"
objbl.BulkLoad = True
objbl.KeepIdentity = False
objbl.CheckConstraints = False
objbl.Transaction = False
objbl.Execute("c:\Items.XSD", "C:\Items.xml")
Thanks
Hardik Panchal
|
|
|
|
|
Does the ASPNET account that your code is running under have any rights to the root of the servers C: drive so it can read those files? I doubt it...
Move the files to where your code is executing from and change these hard coded paths to find the files in the correct folder and it should work.
|
|
|
|
|
I have an application on a server that uses word templates to generate letters. When the client opens the application a query is made to a database, data is returned and that data is then inserted into bookmarks in the word template. The instance of word is opened locally so no office applications are actually installed or ran from the server; the templates are stored in a shared folder on the server.
I can open the template and print a letter, other user's get an exception not handled error, but if the application is actually on the local machine they are fine.
I would appreciate any suggestions.
|
|
|
|
|
jimbaloo wrote: I can open the template and print a letter, other user's get an exception not handled error, but if the application is actually on the local machine they are fine.
What does this mean? If Word is not installed on every computer that is going to run your application, you're wasting your time.
You also neeed to copy any .DLL files you found in your Release folder to the other client machines in order for this to work.
What's the exception? What does the code look like where it occured and on what line?
|
|
|
|
|
The application is not installed on the local machine. The client wishes this to run from an application server and only use the copy of MS Word that is installed on the client machine.
The application on the server manipulates the data, and then calls to the client machine's version of office to insert the text and print the document.
Right now I cannot find what the exception is because from my box it works, and no one else has a copy of Visual Studio installed so I cannot debug from another station.
Other user's can use the application to access the stored procedures. It is just when they attempt to use Word. The application reads from a local Excel file into a dataset, so the server is communicating with the local machine without any .dll's being copied to the local box.
|
|
|
|