|
check for method of the control for something like 'reset'. if there isn't one then look at the designer to know how at design time the control is set and then copy those lines of code and put them in a reset routine to be able to programmatically reset it back to it's original state.
|
|
|
|
|
Good Idea, thank you very much... It makes me mad I cant think of simple solutions like that yet. maybe someday... again, thank you!
-Joey
|
|
|
|
|
how to set notifyicon.icon during run time with imagelist?
|
|
|
|
|
Dim oBitMap As New Bitmap(ImageList1.Images(0))
NotifyIcon1.Icon = Icon.FromHandle(oBitMap.GetHicon)
|
|
|
|
|
Just wondering if anyone knows how to make a project so that when someone changes the windows color scheme (theme) it does not affect the program. There has got to be a way!!!! Please help me with this... Thank you!!!
|
|
|
|
|
don't use system colors. when you add a form to the project it defaults to the color 'control' of the system tab (tab when you pick a color). these are system colors that react to the color scheme of windows.
-- modified at 15:04 Tuesday 12th December, 2006
|
|
|
|
|
I'm trying to deploy my program but in other computers the reference I have for Microsoft Access is different (it has a different path) so it doesn't run on the other computers. Is there a solution to this problem?
|
|
|
|
|
Place your access database on a global computer (computer everyone can access). Then re-add the data source to your project. Look at the connection string that is created for the new data source and make sure that all the client computers will be able to resolve the address (Computer Name or IP, if IP make sure that the serving computer has the IP statically assigned). Hope this helps. It's kind of a generic answer, if your needing something more specific then post the portion of code that references the database for the application and a description of the networking environment the application will be working in.
|
|
|
|
|
Thank You sooooo much!!! But now I'm trying to run this code withouth
using ADO.Net
AccessTmpDB.DoCmd.TransferText(0, MyImpTableName, MyImpTableName, MyTxtFileName, True, "")
AccessTmpDB.DoCmd.RunSQL(MySQL)
Is that possible??
|
|
|
|
|
Hey everyone,
Im currently workin on a little project for work which is driving me insane! I didnt want it to come to this (asking experts for help) but i feel the project needs some fresh eyes to guide me to a better solution. So let me just outline what im trying to do;
First, we have a large list of customers on our server, approx 1316 customers. Now on our intranet webpage i wish to create a fast way of finding customers using an ASP tree. So consider a list of customer names returned from an SQL query into a large array. I then wish to check the first couple of letters of each customer, and group customers with similiar names together under one branch in the tree.
The Result would look something like this;
Customers
|
|-A
___|-ar
______-arson, pat
______-arson, mick
______-arsen, jon
______...
______...
___|-as
______-asnot, mark
______...
______...
___|-Other A's
______...
______...
|-B
___|-ba
______|-bai
__________-bailey, john
__________-bailey, mark
__________...
__________...
______|-bar
__________-barker, paul
__________-barton, mike
__________...
__________...
___|-br
______-bromich, dave
______-brockurst, mick
______...
______...
___|-Other B's
______...
______...
|-C
___-charles, john
___-chaplin, pat
______-chan, johnny
|-D
___|-da
.
.
.
....
just to explain anything with a | beside it represents a branch which has leaves while anythin with just - represents a leaf which will hold a customer name
One main important thing about this code is that i want it to be very dynamic and one important feature is groups of similar names, being grouped in their own branch. For example the code should read like;
if there are less than X names beginning with 'ar' then group these names under a branch called 'ar'
But if there are more than X names beginning with 'ar' then search again through this group and compare the first 3 letters for similarity.
This idea is shown in the B section, here the code found more than X names with -ba as the first two letters, and so and the code ran again comparing the first three letters, these groups of three letters had less hits than X and so are plotted in their own trees -bai and -bar.
I hope you can follow me now as you read this and it makes some sort of sense!
I want it to be so dynamic that lets say, we enter many customers with names starting with -bai, the program will then scan the first four letters of the name and if this is over X, it will scan the first five letters of each name, if again theres more than X it will move onto scanning 6 letters.
Thats is why i call it 'intelligent sorting' i want it to be so streamlined that you could have 200 -bai customers sorted into 5 or 6 branches, while you may have only 5 -D customers which will only fall under the -D branch!
I've been trying to do this with a simple checkltr = left(myarray(1,k),3) command and lots of array sorting, which works. but when i move onto checking 4 letters and 5 letters the code gets way too big and eventually just becomes inefficient, there has to be a way of doing this with not much code.
Please, please, please if anyone can help it would be great!
NOTE: I DONT NEED HELP WITH THE .ASP TREE, JUST WITH SORTING THE DATA!!
|
|
|
|
|
You can do this in SQL by writing a statement like this:
SELECT * FROM myTable WHERE customerName like 'BAI%'
The % is a wildcard character in SQL. The one thing to watch out for is that SQL it is case sensitive, so to search for all possiblities you'd have to uppercase the customerName first.
Hope this helps.
|
|
|
|
|
yes i know that SQL statement. But then the list sorting is not dynamic, what if lots of 'BAT' customers were added to the table, one would then have to go into the code and add the SQL statement for that!
i need to use arrays that sift through the table plucking out groups of names that have similar first letters! i just dont know the best approach!
|
|
|
|
|
You can perform some SQL to the in memory DataTable. This can be done using the .Select function on the DataTable object. It will return an array of table rows that you can loop through to load your array. So it would look something like this:
'dtMaster has all of your master data<br />
For Each myRow as DataRow in dtMaster.Select("Customer like 'BAT%')<br />
'Add myRow("Customer") to your string array<br />
Next
As I stated before, this works only if the data in your DataTable is the same case, so you may have to create a second column of the customer names and upper case it so that you can use this. I hope this helps and is what you were looking for.
|
|
|
|
|
Hi,
I want to add Windows Installer 2.0 in my VB.Net Setup for supporting at Windows 98 OS. But when i built my setup specified folder not added in Setup folder.
If any one have an idea, please help me.
Bye.
|
|
|
|
|
hello whom ever,
im creating a playlist program in vb.net. i am trying to add a file name to a list box from my documents. the thing is im almost there, the file name appears at the top of the form as the form title but i need it in the list box.
it would be greatly appreciated if you could try and help me out.
heres a snipit of the code. cheers
Me.openFileDialog1 = New System.Windows.Forms.OpenFileDialog
openFileDialog1.ShowDialog()
Dim name As String = openFileDialog1.FileName
Dim contain As String = openFileDialog1.FileName
listBox1.Text = openFileDialog1.FileName
Me.Text = name
''contain.close()
|
|
|
|
|
You have to change the following line of code.
Change: listBox1.Text = openFileDialog1.FileName
To: listBox1.Items.Add(openFileDialog1.FileName)
Have a great day.
Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are at now.
|
|
|
|
|
thanks matey you'll be pleased to know i figured that out not too many seconds after i posted that message, stupid me. if your not to busy i could do with a bit more help on a couple of things.
how can i assign a command to select all items in the list and how do i move up and down the list
|
|
|
|
|
Hi, I'm creating an application for outlook 2003 using VS 2005(vb.net) and VSTO 2005 SE. However I am trying to add a button to the outlook toolbar, kinda like the send recieve button and an item to the "tools" menu. However I am struggling to get anywhere with it, does anyone know of anything that could be of help?
Thanks in advance
Chris
|
|
|
|
|
I am a beginer vb6 programmer, Now i m in big trouble, my need to make a multi column combo with auto complete and have header & sorting by header...
Please Help me..!!
Please Help me..!!
Please Help me..!!
|
|
|
|
|
I've made a programme similar to the Windows Wordpad. and i want to use a msgbox to choose whether to save the text stored in richtextbox before the Form is closd
if the result of msgbox is Yes, a function 'savefile' will be called and after that the Form will be closed, if the result of the msgbox is No, the Form will be closed, and if result is Cancel, the Form will stay open.
how can I do it?
i've tried several times but it doesn't work.
please help. ~~
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
MsgBox("The Text in the file has been changed.Do you want to save it?", MsgBoxStyle.YesNoCancel, "Wordpad")
If MsgBoxResult.Yes Then
savefile()
e.Cancel = False
ElseIf MsgBoxResult.No Then
e.Cancel = False
ElseIf MsgBoxResult.Cancel Then
e.Cancel = True
End If
End If
End Sub
sync_austin
|
|
|
|
|
You need to include the message in the if statement:
If MessageBox.Show("Exit?", "Exit?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Hand) = Windows.Forms.DialogResult.Cancel Then<br />
e.Cancel = True<br />
Else<br />
e.Cancel = False<br />
End If
Alternatively:
dim result as windows.forms.dialogresult<br />
<br />
result = MessageBox.Show("Exit?", "Exit?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Hand)<br />
<br />
if result = Windows.Forms.DialogResult.Cancel then<br />
e.cancel = true<br />
elseif result = result = Windows.Forms.DialogResult.Yes then<br />
' do whatever<br />
else<br />
' do whatever<br />
end if
This way the cancel is dependant on the result.
P.S. Msgbox is old now, use messagebox.show, it's much more versatile and easier to create dialogs.
-- modified at 5:33 Tuesday 12th December, 2006
Posted by The ANZAC
|
|
|
|
|
We have have 10 VB6.0 proejcts, all the 10 projects are refered by one Main Project (Vb6.0)
Using VS2005 upgrade wizard, we have migrated only the Main Project, .net automatically created interop for the other projects.
The application (migrated application) is running smoothly .net.
But while closing the applicaiton we are getting the following error :
"unhandled exception at 0x660688 (msvbvm60.dll) in DBCenter.exe: 0xc0000005: Access violation reading location 0xfeeeffaa"
Please help us to resolve this error.
Advanced thanks
Mano
|
|
|
|
|
Can anyone offer some advise on how to improve performance (VB application, VS 2005) ...
An mdi window has a tab control that I'm using to show/hide child windows i.e. tabpage1 shows child windows 1,2,3, tabpage2 shows child windows 4,5,6 etc. I use a for loop to show the windows assigned to the selected tab and hide the ones that aren't.
However as the number of tabs & child windows grows, it becomes sluggish.
I cured this by actually assigning the child windows to the actual tabpages but then have problems maximising the child windows.
Anyone know of another solution I could try?
|
|
|
|
|
dose any one know about dos printing i want to print Barcode on epson Lq 680
code39 . need help
|
|
|
|
|
Dot matrix printers are not the best for barcodes. There dpi is too low. Having said that, to print barcodes from DOS you will need a printer module. I have purchased these in the past from Fontware
Steve Jowett
|
|
|
|