|
VB.NET 2005 (and only 2005) has single instance support built in IF you have enabled the Application Framework option in My Project properties. Then you can enable the "Make single instance application" option just under "Enable application framework". It will not, however, handle passing parameters between the newly started instance and the already started instance.
You can read more about implementing this by searching the articles for "single instance[^]". There's plenty of examples...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I want to play a wave file using the default audio windows device and also (if installed)the others audio devices.How can I do in visual basic?in particular I already use the Api:
Public Declare Function PlaySoundData Lib "winmm.dll" Alias "PlaySoundA" _
(lpData As Any, _
ByVal hModule As Long, _
ByVal dwFlags As Long) As Long
but this play a file only in default windows audio device.
The next step, that I want to do, is that the user of my application, select which audio device use to reproduct the audio.
|
|
|
|
|
i'm using following statement to redirect the value of single variable value to another page:-
Response.Redirect("AdminAgent.aspx?EMPID=" & x)
within statement i want to send name variable also.
how can i redirect.& similary how can i get in other page.
|
|
|
|
|
The name-value pairs in the querystring are separated by the & character. You should construct an url in the format:
page.ext?key=value&key=value
---
b { font-weight: normal; }
|
|
|
|
|
when i tried the following code from ur suggestion
At the time of Reirecting :
Response.Redirect("AdminAgent.aspx?EMPID=x & EMPName=name")
At the time of Requesting:
Dim id As Integer = CType(Request.QueryString("EMPID"), Integer) for integer
Dim name As string = CType(Request.QueryString("EMPName"), string) for string
its giving error in BOLD Line
Conversion from string "x " to type 'Integer' is not valid.
if u can then send the approprite code
thanx
|
|
|
|
|
aavesh wrote: Response.Redirect("AdminAgent.aspx?EMPID=x & EMPName=name")
That's because you sent the character X, not a value that can be converted to a number.
Response.Redirect("AdminAgent.aspx?EMPID=" & x & "&EMPName=" & name")
In your AdminAgent page:
Dim id As Integer = CType(Request.QueryString("EMPID"), Integer)
Dim name As string = Request.QueryString("EMPName")
I don't where you got this "for integer" stuff from and QueryString returns a String, so there is no need to convert a String to a String...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi
thanx for giving me a solution.
sir i'm working on a project in vb.net.which is basically a web site creater project.
i don't have any abt web site creator application.could u guide me.
right now i'm working on its admin part.
according to my project specification there is licesense funda for sites which will be creating.
sir if u can positively help me then let me know.
if possible then i'll sendu my specification on ur personal id.
if u r not interested then plz let me know too.
thanx..whatever will be ur decision..
byeeeeee
|
|
|
|
|
aavesh wrote: i don't have any abt web site creator application
What?? You don't have any "???" web site creator application?
aavesh wrote: according to my project specification there is licesense funda for sites which will be creating
What's a "funda"??
aavesh wrote: sir if u can positively help me then let me know
I don't understand the questions, so there's not much I can say to help...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hello sir
sorry for inconvinience.
sir my question is i have to create a web site creator application.
and i don't have any idea about it.how should i work on it.
my second question was how can i attach the licensing feature with my project.
so for that reason i asked u could u guide me on this project.
thanx
|
|
|
|
|
aavesh wrote: how should i work on it.
This is a VERY vague question and entirely dependant on what you mean by a "site creator" and what features you want. The most basic of HTML editors is nothing but a glorified text editor.
Licensing? Google for "software licensing solutions[^]" and you'll come up with a bunch of them. None of them are free though...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I am new in .NET. I have a system in VB.net currently and the pages is already developed in VB.net. Here if i'd like to use the C# for incoming pages, izzit possible for me to combine both programming language in one solution? Thank you!
|
|
|
|
|
Yes, you can combine different languages in the same solution, but not in the same project. You can have your UI written in VB and in a different project(s), write your Logic and Data layers in C# if you want.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I'm using comboboxes in my WindowsForms. I do have a question concerning the ComboBox.ValueMember. Is it possible to store an object in this valuemember?
Thanks!
G72360
|
|
|
|
|
The ComboBox's value property is of type Object, so yes, you can use pretty much anything you want.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I'm making a VB application that contains few reports. Some of reports need to be printed in multi copy fashion i.e. on a single command report should print 5 copies. Any Suggestion how to achieve this and also I want a change in label text i.e. on first copy it shld print "First" on second copy it shld print "Second" and so on till 5th copy?
Thanks in advance
Sumit
|
|
|
|
|
Hello friends
I have a problem related to webservice,how to use webservice using REST.i have never use this one..
My problem is that i have a client which wnat get a xml file which is store on server, so its interect with webservice,and by webservice it will get a url of xml file.then from that URL user will get That XML file.
so i want to use in that process REST with webservice not soap,that is http get or post method..by default ,net framework use the soap..
but i want to implement using REST..
so plz help me..
thanks
chear up..
|
|
|
|
|
Well, REST is not a standard and there is nothing concrete about it, so there is no support for it in the .NET Framework. To rip from an existing web site[^]:
REST is not a standard. You will not see the W3C putting out a REST specification. You will not see IBM or Microsoft or Sun selling a REST developer's toolkit. Why? Because REST is just an architectural style. You can't bottle up that style. You can only understand it, and design your Web services in that style. (Analogous to the client-server architectural style. There is no client-server standard.)
It looks like you don't have a real firm grasp on what REST is all about. You might want to do some research on it first. REST is NOT a transport or serialization method. You have to design your webservice with the IDEA of REST. There is no implementation!!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi,
i am new in vb.net, i not know how to use datatable in vb.net , what is usefull to me pls define with code it very help full to me. thanks
vipin paliwal
|
|
|
|
|
If all you want is an overview of the DataTable class, read the documentation[^] on it. If you're looking for something more specific, you'll have to ask a more specific question.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Okay guys...I'm new to VB.NET. In fact, the only experience I have is building ASP applications. I have an application I am planning to design no matter how long it takes. It's just something I have to prove to myself I can do. Plus, it will make my work easier if I can accomplish my goals with the application.
I'm using the free VB Express from Microsoft as well as SQL Express. I have described briefly what I want my application to do at my site, http://berrien.homeip.net/application.asp[^] . I have been reading up on OOP and I think I am understanding that pretty well and I have been reading a little on the .NET Framework. I know I have a lot to learn, but I would like to build this application along the way if any of you would be so kind to help me. Thanks guys.
|
|
|
|
|
What you have described there is commonly known as a Content Management System, or CMS. There are other similar things such as dotnetnuke which are used for maintaining a portal website.
Im not sure how much help you can get here, as this forum is specifically for code related queries.
|
|
|
|
|
what is the coding or basic structure of code that is used to make a remove button for a listbox, so that only teh selected item is removed not the entire list?
also how do you make the clear list remove all files in the list but one? like the name?
thanks
|
|
|
|
|
surfer.chic.robbie wrote: make a remove button for a listbox
Are you saying you want a delete button next to every item in a ListBox? Or just one button that deletes selected items in a ListBox?
surfer.chic.robbie wrote: also how do you make the clear list remove all files in the list but one
You can do this two ways. You can iterate through the list items deleting each item (you can't use For Each for this!!) and skip the one you want. Or you can just wipe out the entire list and recreate the one item you want to keep.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
just a button where something is selected in the listbox that when the remove button is pressed that only it gets removed form the list everything else stays.
|
|
|
|
|
Easy, but with a hidden gotcha. Each the index of each selected item is contained in the ListBox's SelectedIndicies property. All you have to do is go through this list using For/Next , NOT For Each/Next !!, and remove each item from the Items collection at the index listed in SelectedIndicies .
There's the catch though! You have to go through the SelectedIndicies backwards! If you don't, you'll end up with an IndexOutOfRangeException . This is because as you remove items from the ListBox, the size of the collection of Selectedindicies changes. Say you have 10 items selected. At the beginning of the For/next loop, you'll be counting from 0 to 9. But, after you remove the first item, the upper limit of the Selectedindicies collection will be 8, not 9. And so on until your loop, still counting to 9, passes the upper limit of the Selectedindicies collection.
Dim i As Integer
For i = ListBox1.SelectedIndices.Count - 1 To 0 Step -1
ListBox1.Items.RemoveAt(ListBox1.SelectedIndices(i))
Next
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|