|
your thread is still runnig probabliy because you didn't do a good cleaning (you leted some objects that couldn't be closed opened)
I sugest you close the program by simply by calling Application::Exit(); this closes the window opened for message loop end exits the application.
if you are not satisfied by this mthod you colud always abort a thread (cause an imediatly close and resource freeing process) like this (for the curent thread) System::Threading::Thread::CurrentThread->Abort();
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Good day all…
I am interested in adding the fading color (similar to the Windows Media Player version 10) scheme to my Main Menu. Does anyone have an object type or maybe guide to a location where I can complete this solution?
Thanks in advance for your assistance.
Have a great coding day.
Regards,
Tony D. Abel
|
|
|
|
|
I have the following code, but I cannot seem to get the changes in the dataset to be commited to the database. All I get is a 0 rowcount:
Private editQry As String = "select idc,nomiko,Eponymo,Onoma,Tel from Persons where idc=1"
Private adoCEDataAdapter As SqlCeDataAdapter
Private CustEditDataSet As DataSet
Private cb As SqlCeCommandBuilder
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
Private Sub frmCustEdit_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adoCEDataAdapter = New SqlCeDataAdapter(editQry, frmConnect.adocon)
cb = New SqlCeCommandBuilder(adoCEDataAdapter)
CustEditDataSet = New DataSet
adoCEDataAdapter.Fill(CustEditDataSet)
txtSurname.DataBindings.Add(New Binding("Text", CustEditDataSet.Tables(0), "Eponymo"))
txtName.DataBindings.Add(New Binding("Text", CustEditDataSet.Tables(0), "Onoma"))
txtTel.DataBindings.Add(New Binding("Text", CustEditDataSet.Tables(0), "Tel"))
cbLegal.DataBindings.Add(New Binding("SelectedIndex", CustEditDataSet.Tables(0), "nomiko"))
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox(adoCEDataAdapter.Update(CustEditDataSet).ToString())
Me.Close()
End Sub
I have tried to create the Update query with:
adoCEDataAdapter.UpdateCommand=cb.GetUpdateCommand
and it returns a query, but again nothing happens on the adoCEDataAdapter.Update(CustEditDataSet)
Help....
|
|
|
|
|
Hi all,
I've created a new windows form application (C++) project,
and I can't see the form's events - not under the Properties window and not in the bar that is above my code editor. Do I have to add anything to support this?
thanks.
/=/=/=/= Sagmam =\=\=\=\
|
|
|
|
|
This is my first time delploying a windows application. I was able to deploy it to a computer that has .net installed but how do I deploy to a computer without .net installed. I think I need to add dotnetfx.exe to my installer but don't know how. Are their any walkthroughs out their that are simple to follow for a first timer? Please help.
Thanks in advance,
Beginner in VB.Net
|
|
|
|
|
You can do many things to get .NET installed on the target machine. InstallShield has .NET built in and will create an installer or if you have Visual Shtudio 2003 then you can use the PluginInstaller[^] from Microsoft and then just create a setup project and .NET will be included for you.
Steve Maier, MCSD MCAD
|
|
|
|
|
I am using Visual Studio 2002 Framework 1.0. How do I use the installshield? Again this is my first deployment so any examples would be great.
Thanks
Beginner in VB.Net
|
|
|
|
|
Installshield is a separate app that you would have to purchase. You would be in better shape to just use the deployment projects that are built into VS 2002.
Steve Maier, MCSD MCAD
|
|
|
|
|
How do I do that? I need to figure out how to check if the computer has framework 1.0 and if it doesn't install it.
It tells me that Dotnetfx.exe can be redistributed with your setup. How do you do this?
Thanks
Beginner in VB.Net
|
|
|
|
|
Hi !
I've got an binary executable from Internet, which firstly checks if .Net is installed on the computer. If not , it executes dotnetfx.exe to install .NET. After installed .NET, it automatically launchs the deployment of your windows application.
This binary executable works with a configuration file. Here is the content of this file named settings.ini
[Bootstrap]
Msi=<DeployingApplication.msi>
FxInstallerPath=<D:\dotnetfx.exe>
where
<DeployingApplication.msi> is the path to your windows application installer .
<D:\dotNetFramework> , is the path to dotnetfx.exe
Then save the modifications.
But I don't know how to send you the binary file that automatically install .NET
Could you help me ?
|
|
|
|
|
Hi
Am I creating a new file called settings.ini or am I modifying an existing one?
What is the file called that automatically installs .Net? If you know where it is just send me an email and attach it to the email (timothy at myactv dot com). Or if you can remember the link from where you got it, you can send me that too.
Thanks
Beginner in VB.Net
|
|
|
|
|
Here is a link to the .NET Downloads[^]. This link has all versions of .NET and the service packs too.
Steve Maier, MCSD MCAD
|
|
|
|
|
I have downloaded the framework 1.0 sp2 and installed it. How do I use it in my deployment project?
Is there something I am missing here?
Beginner in VB.Net
|
|
|
|
|
Microsoft made is simple to add the framework to your setup programs for the VS 2003. I am not sure if the same thing works on 2002 or not. I am thinking that it would not. InstallShield was one of the simplest ways to put it in, but that is a separate purchase. The NSIS[^] installer has samples of getting the framework from Microsoft's website during the install. For 1.0 there was not a really good way that I know of to make sure that it was installed besides a 3rd party installer. That is one reason that I upgraded to VS 2003.
Steve Maier, MCSD MCAD
|
|
|
|
|
|
I have a Form with a ListView and two buttons(Move_Up & Move_Down). I want to reoder the ListView by moving an item up or down by clicking either the button Up / button Down. I get the selected listView item's Index, then use Index + 1 or Index -1 to move the item up / down. The code of move up with Index-1 works. But the code of move down with Index+1 does not work. I don't know why, please help! Thanks! The code is as follows:
// this move up works (Index-1)
private void btnUp_Click(object sender, System.EventArgs e){
if(listView1.Items.Count != 0){
ListViewItem item = listView1.FocusedItem;
if(item != null){
int index = item.Index -1
ListViewItem insert = (ListViewItem) listView1.Items.Insert(index, insert);
listView1.Items.Remove(item);
}
}
}
// this move down does NOT work (Index +1)
private void btnDown_Click(object sender, System.EventArgs e){
if(listView1.Items.Count != 0){
ListViewItem item = listView1.FocusedItem;
if(item != null){
int index = item.Index + 1
ListViewItem insert = (ListViewItem) listView1.Items.Insert(index, insert);
listView1.Items.Remove(item);
}
}
}
|
|
|
|
|
It doesn't work becuase.... oh, i'll just show you
The list:
Item1="1"
Item2="2"
Item3="3"
OK?
now lets say you want to move the item at index 2 one step down, your
code does two things, add a new item, and removes the old one, right?
lest do these two steps-
Step 1 - add new item
Item1="1"
Item2="2"
Item3="2"
Item4="3"
Now if we remove item at index 2+1 (item3 now) what do you think will happen?
what you need to do is switchi between the item(index) and item (index+1)
the same thing will work with moving an item upwards - switch item(index) with item(index-1)
it will be a lot faster then using the insert/b> method, trust me
Fade (Amit BS)
|
|
|
|
|
|
Hi !!!
I developped an n-tier application with distributed objects via .NET REMOTING
Client-(Remoting).....(Remoting)-Business Objects --- Data layer --- Databases
My problem is that i would propagate the "NT token Authentification" or "Login NT" from my Client to my Database (SQL 2000 server)
Is it possible to propogate or passed this login into the .NET remoting and how ???
Our infrastructure is based on Active Directory with XP Pro, Win 2K Servers and 2003 Servers.
Thanks in advance
|
|
|
|
|
|
thanks a lot
|
|
|
|
|
First, i know this isn't the best place to post this article but i felt this has something to do with the frameworks...
I have a really big application running on vb6, it will take months to port it to .net
in the meanwhile i need to use some GDI+ capabilities (and some threading).
I wrote some DLLs that will do the job for the big applications, but i don't know how to export them to VB6,
When i'm trying to add the reference to the DLL, it gives me an error message that it cannot use that kind of DLL.
I thought of using OCXs instead, but i don't seem to find a way to create an OCX in VB.Net (i know i can do in c++/# but i have tons of code already written in VB.net and i'm on a tight schedule)
Can anyone help me out?
Fade (Amit BS)
Fade (Amit BS)
|
|
|
|
|
|
i'm sorry, but the article you mentioned only works for c#, i need it to work with vb.net, i've tried MANY methods to attack this problem and i keep getting dead ends.
i need some kind of an example vb project that can compile to an OCX, or a referencable DLL from VB6 (i can't get the vb.net project to strong name - there is no option in the 'Properties'->'Build' to set a key...)
please let me know if there is some way to do this, it will save me weeks of work
i need a vb.net project that compiles to a working something in vb6
thanks for the effort
Fade (Amit BS)
|
|
|
|
|
hi !
I have a solution, but it is in French and I don't have time to translate it in English
Here it is :
Créer et utiliser un composant COM à partir de .NET
.NET est fabuleux, c'est un fait! Cependant lorsque vient le moment d'effleurer la
création d'objets COM, la technique peut paraître complexe pour plusieurs d'entre nous. Ce
mois-ci, je vais tenter de vous introduire à la création de composants COM via .NET en
relatant une problématique tirée d'une situation concrète à laquelle je fais face en ce moment.
La problématique en quelques mots est que nous avons une application ASP 3.0 vieille de 3 ans qui communique avec un composant COM développé en VB6 et hébergé sous Microsoft Transaction Server (MTS). Pour une raison obscure, notre composant COM VB6 arrête maintenant de fonctionner de façon aléatoire, sans avertissements et sans aucune information pertinente et du même coup tous nos usagers sont affectés. Le facteur temps est important dans la résolution de ce problème puisque nos usagers sont affectés. Alors, après plusieurs recherches et diagnostiques, nous en sommes venus à la conclusion où la seule alternative viable est de recréer notre composant COM en VB.NET afin de nous offrir une plus grand stabilité et une flexibilité de diagnostique accrue. Voici donc les étapes que j'ai suivi pour développer le composant COM en question sous VB.NET dans Visual Studio.NET.
Étape 1 - Création de l'application
1. Créez un nouveau projet de type "Class Library"
2. Effacez la classe class1.vb
3. Ajoutez une nouvelle classe de type "COM Class"
4. Ajoutez une ou plusieurs fonctions à cette classe
Étape 2 - Construction (build) du composant COM
Pour que .NET puisse construire un COM, vous devez ajouter un "strong name" à votre projet.
1. Ouvrez une session DOS via le raccourci "Visual Studio .NET Command Prompt"
2. À l'invité DOS, tapez "sn -k le_nom_de_votre_projet.snk"
3. Ajoutez le fichier nouvellement créé "le_nom_de_votre_projet.snk" dans le répertoire \obj\Debug (ou \obj\Release, selon le mode de votre projet)
4. Éditez le fichier AssemblyInfo.vb pour y ajouter une référence au fichier .snk nouvellement créé en ajoutant l'attribut suivant:
* <assembly: assemblykeyfile("le_nom_de_votre_projet.snk")="">
5. Sauvegardez les changements et construisez (build) votre projet
Étape 3 - Enregistrement du composant COM
Traditionnellement, les composants COM étaient enregistrées avec l'utilitaire regsvr32.exe mais comme .NET ne construit pas tout à fait un composant COM traditionnel, mais plutôt un emballage (wrapper) qui permet d'émuler un composant COM, il faut donc l'enregistrer différemment.
1. Après la construction de votre projet, deux fichiers seront créés dans le répertoire /bin de votre projet; Un fichier avec l'extension .dll et un fichier avec l'extension .tlb, copiez ces 2 fichiers sur l'ordinateur où vous désirez les utiliser (le fichier avec l'extension .pdb, (si en mode debug) n'est pas requis)
2. Toujours à l'invité de votre fenêtre DOS "Visual Studio .NET Command Prompt", tapez les commandes suivantes (voir le point 1 de l'étape 2 si elle n'est pas ouverte):
* Enregistrez votre assembly (.dll):
regasm votredll.dll
* Ajoutez une référence à votre assembly (.dll) dans le Global Assembly Cache (GAC):
gacutil -i votredll.dll
Et voilà! Votre premier composant COM sous .NET est maintenant prête à être utilisée.
Un peu plus...
Il peut s'avérer très utile de retirer l'enregistrement de votre composant COM pour en enregistrer une nouvelle version par exemple, voici donc comment:
* Retirez la référence à votre dll du GAC:
gacutil -u votredll (sans extension!!!)
* Retirez l'enregistrement de votre dll:
regasm -u votredll.dll
That's all
Good luck !
|
|
|
|