2Danke
ERLEDIGT
JA
JA
ANTWORTEN
12
12
ZUGRIFFE
318
318
EMPFEHLEN
-
Hey ich weis nich ob die frage schon mal gestellt wurde...
aber gibt es ne einsteigerfreundliche art ein File von oder auf einen server zu laden?
hab mir einige sachen angeschaut bin aber erlichgesagt nich ganz dahintergestiegen....
wäre seeeeehr dankbar für ein EINFACHES Beispiel mit schritt für schritt anleitung
mfg
--Nawi
overall mouse moved :http://www.mousometer.de/mousometer16516.gif
Today : http://www.mousometer.de/mousometer16516h.gif
-
Da gibts ne ganze reihe möglichkeiten, die vor allem stark davon abhängen was du für protokolle verwenden willst.(FTP, HTTP, WebDAV, Cifs, NFS, ....)
Am einfachsten dürften down und upload mittels HTTP oder FTP unter windows zu realisieren sein indem man WinINET verwendet.
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
(InternetOpen, InternetConnect, FtpGet, FtpPut ect.)
Wenn du eher was cross platform kompatibles haben willst, gibt es libcurl (http://curl.haxx.se/)
oder du kannst natürlich auch direkt mit sockets arbeiten um das ergebniss zu erreichen.
-
Okay hab mir mal das mit Ftpput / get angeschaut nun aber volgendes problem sobald ich
Code :1 2 3 4 5 6
#include <windows.h> #include <strsafe.h> #include <wininet.h> #pragma comment(lib, "wininet.lib") #pragma comment(lib, "user32.lib")
das includiere kommt mir mein compiler mit:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(431) : error C3641: 'StringCchCopyA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(437) : error C3641: 'StringCchCopyW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(560) : error C3641: 'StringCbCopyA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(566) : error C3641: 'StringCbCopyW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(723) : error C3641: 'StringCchCopyExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(732) : error C3641: 'StringCchCopyExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(900) : error C3641: 'StringCbCopyExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(909) : error C3641: 'StringCbCopyExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1070) : error C3641: 'StringCchCopyNA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1077) : error C3641: 'StringCchCopyNW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1207) : error C3641: 'StringCbCopyNA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1214) : error C3641: 'StringCbCopyNW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1389) : error C3641: 'StringCchCopyNExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1399) : error C3641: 'StringCchCopyNExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1577) : error C3641: 'StringCbCopyNExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1587) : error C3641: 'StringCbCopyNExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1747) : error C3641: 'StringCchCatA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1753) : error C3641: 'StringCchCatW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1869) : error C3641: 'StringCbCatA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(1875) : error C3641: 'StringCbCatW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2035) : error C3641: 'StringCchCatExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2044) : error C3641: 'StringCchCatExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2215) : error C3641: 'StringCbCatExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2224) : error C3641: 'StringCbCatExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2383) : error C3641: 'StringCchCatNA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2390) : error C3641: 'StringCchCatNW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2515) : error C3641: 'StringCbCatNA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2522) : error C3641: 'StringCbCatNW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2692) : error C3641: 'StringCchCatNExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2702) : error C3641: 'StringCchCatNExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2879) : error C3641: 'StringCbCatNExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(2889) : error C3641: 'StringCbCatNExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(3053) : error C3641: 'StringCchVPrintfA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(3053) : error C4439: 'StringCchVPrintfA' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(3060) : error C3641: 'StringCchVPrintfW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(3060) : error C4439: 'StringCchVPrintfW' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(3184) : error C3641: 'StringCbVPrintfA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(3184) : error C4439: 'StringCbVPrintfA' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(3191) : error C3641: 'StringCbVPrintfW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(3191) : error C4439: 'StringCbVPrintfW' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4066) : error C3641: 'StringCchVPrintfExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4066) : error C4439: 'StringCchVPrintfExA' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4076) : error C3641: 'StringCchVPrintfExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4076) : error C4439: 'StringCchVPrintfExW' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4251) : error C3641: 'StringCbVPrintfExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4251) : error C4439: 'StringCbVPrintfExA' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4261) : error C3641: 'StringCbVPrintfExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4261) : error C4439: 'StringCbVPrintfExW' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4417) : error C3641: 'StringCchGetsA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4422) : error C3641: 'StringCchGetsW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4543) : error C3641: 'StringCbGetsA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4548) : error C3641: 'StringCbGetsW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4694) : error C3641: 'StringCchGetsExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4702) : error C3641: 'StringCchGetsExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4859) : error C3641: 'StringCbGetsExA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(4867) : error C3641: 'StringCbGetsExW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(5008) : error C3641: 'StringCchLengthA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(5014) : error C3641: 'StringCchLengthW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(5129) : error C3641: 'StringCbLengthA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(5135) : error C3641: 'StringCbLengthW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(152) : error C3641: 'StringCopyWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(158) : error C3641: 'StringCopyWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(164) : error C3641: 'StringCopyExWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(174) : error C3641: 'StringCopyExWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(184) : error C3641: 'StringCopyNWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(191) : error C3641: 'StringCopyNWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(198) : error C3641: 'StringCopyNExWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(209) : error C3641: 'StringCopyNExWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(220) : error C3641: 'StringCatWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(226) : error C3641: 'StringCatWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(232) : error C3641: 'StringCatExWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(242) : error C3641: 'StringCatExWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(252) : error C3641: 'StringCatNWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(259) : error C3641: 'StringCatNWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(266) : error C3641: 'StringCatNExWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(277) : error C3641: 'StringCatNExWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(288) : error C3641: 'StringVPrintfWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(288) : error C4439: 'StringVPrintfWorkerA' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(295) : error C3641: 'StringVPrintfWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(295) : error C4439: 'StringVPrintfWorkerW' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(302) : error C3641: 'StringVPrintfExWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(302) : error C4439: 'StringVPrintfExWorkerA' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(313) : error C3641: 'StringVPrintfExWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(313) : error C4439: 'StringVPrintfExWorkerW' : function definition with a managed type in the signature must have a __clrcall calling convention C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(324) : error C3641: 'StringLengthWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(330) : error C3641: 'StringLengthWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(341) : error C3641: 'StringGetsExWorkerA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\strsafe.h(350) : error C3641: 'StringGetsExWorkerW' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe
zum projekt kann ich sagen das es eine neue windows forms anwendung is wo bi jetzt 1 button ohne funktioon drauf is woran liegt das?-..-
und dann hätte ich noch eine frage :
Wie kann man während der laufzeit neue Buttons erstellen mit
"definiertername+int" als name?
so hab ichs versucht
Code :1 2
butt+i.ToString Button=gcnew Button(); butt();
Code :1 2 3
Button().Name="Test"; Button().Visible=1; Button().Location=Point(0,0);
Geändert von Nawi0 (19.07.11 um 14:36 Uhr)
mfg
--Nawi
overall mouse moved :http://www.mousometer.de/mousometer16516.gif
Today : http://www.mousometer.de/mousometer16516h.gif
-
Hallo,
wenn du eine Windows-Forms-Anwendung hast, dann benutze die Klasse WebClient aus der .NET-Bibliothek.
Gruß
MCoder"The three chief virtues of a programmer are: Laziness, Impatience and Hubris."
--- Larry Wall
-
Hallo,
Erstmal vorweg: Wenn du mit Windows Forms arbeitest bist du mit C++/CLI aus der .NET Umgebung unterwegs und nicht mit C++.
Genau daraus resultieren auch die Fehlermeldungen. Wenn du mit .NET arbeitest solltest du dir anschauen welche Möglichkeiten dir dieses von sich aus schon bietet um mit Netzwerken zu arbeiten.
Zur Frage mit den Buttons: Nein, du kannst keine String-Operationen verwenden um einen Variablennamen zu deklarieren. Was du aber machen kannst, ist die Buttons in einem Array abzuspeichern. Dann kannst du mitdarauf zugreifen.Code csharp:1 2
Button[] butt = gcnew Button[10]; butt[i] = gcnew Button();
Zu deinem geposteten Code: Der ist sowieso Kraut und Rüben, 1. Zeile: Wenn du eine Variable deklarierst kommt IMMER: int i; und nicht i int;
Dann stellt sich mir die Frage warum du überall Button() verwendest wenn deine Variable butt heißt. Mit Button() rufst du den Konstruktor der Klasse Button auf. Und wenn mich nicht alles täuscht fehlt in der Zeile mit der Location ein gcnew.
-
Okay das wuste ich nicht danke...Hallo,
Erstmal vorweg: Wenn du mit Windows Forms arbeitest bist du mit C++/CLI aus der .NET Umgebung unterwegs und nicht mit C++.
Genau daraus resultieren auch die Fehlermeldungen. Wenn du mit .NET arbeitest solltest du dir anschauen welche Möglichkeiten dir dieses von sich aus schon bietet um mit Netzwerken zu arbeiten.
das sind zwie unabhängige schnipsel also 2 versuche .
Okay das war mein fehler aber im großen und ganzen hätte es so sein sollenWenn du eine Variable deklarierst kommt IMMER: int i; und nicht i int;
Code :1 2
int i; butt+i.ToString ..... etc
und wie meinst du es mitt die buttons in einem array ablegen ich will ja komplett neue während der laufzeit draufpacken....
in c binn ich noch nich so bewandert sry ..mfg
--Nawi
overall mouse moved :http://www.mousometer.de/mousometer16516.gif
Today : http://www.mousometer.de/mousometer16516h.gif
-
Wenn du die Anzahl vorher nicht kennst kannst du eine .NET ArrayList oder einen vector verwenden. Du kannst auf jeden Fall keine Variablennamen aus Strings kombinieren.
-
-
mfg
--Nawi
overall mouse moved :http://www.mousometer.de/mousometer16516.gif
Today : http://www.mousometer.de/mousometer16516h.gif
-
C++ ist die Erweiterung von C um objektorientierte Sprachelemente. C# ist eine vollkommen neue Sprache, die sicher von vorhandenen Sprachen teilweise inspiriert ist, aber ansonsten keine Beziehung etwa zu C/C++ hat.
Für die Arbeit mit dem .NET-Framwork (deine Windows-Forms-Anwendung) hat Microsoft das sogenannte Managed C++ erfunden - eine Sprache, die es sonst nirgendwo gibt und daher ziemlich proprietär ist.
das "Managed" bezieht sich auf die Tatsache, dass .NET ein Speichermanagment mitbringt. Man muss sich nicht mehr um das Aufräumen von alloziierten Speicher kümmern. Das erledigt ein sogenannter Garbage Collector. Allerdings wird nun das Zusammenwirken mit herkömmlichen (unmanaged) C++ Code komplizierter, wie du ja schon bei deinen ersten Versuchen mit der Windows-API gemerkt hast.
Gruß
MCoder"The three chief virtues of a programmer are: Laziness, Impatience and Hubris."
--- Larry Wall
-
OOkay ich merk grad das ich wirklich nich all zu viel weis -.-'
Aber meine frage bleibt t.dem ...
wie kann ich den nu n neuen button erstellen oder geht das gar nich?mfg
--Nawi
overall mouse moved :http://www.mousometer.de/mousometer16516.gif
Today : http://www.mousometer.de/mousometer16516h.gif
-
Dann solltest dich mal mit den Grundlagen beschäftigen.
Wie man einen Button erzeugt, kann ich dir zeigen:
GrußCode cpp:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Form1(void) { //... Button^ myButton = gcnew Button(); myButton->Text = "Klick mich"; myButton->Location = System::Drawing::Point(10,100); myButton->Size = System::Drawing::Size(75,25); myButton->Click += gcnew System::EventHandler(this, &Form1::OnClickMyButton); Controls->Add(myButton); // Zur Form hinzufügen // ... } // ... void OnClickMyButton(System::Object^ sender, System::EventArgs^ e) { // ... }
MCoder"The three chief virtues of a programmer are: Laziness, Impatience and Hubris."
--- Larry Wall
-
Very Nice Danke dir mal was das funktioniert
DDD
mfg
--Nawi
overall mouse moved :http://www.mousometer.de/mousometer16516.gif
Today : http://www.mousometer.de/mousometer16516h.gif
Ähnliche Themen
-
Frage zu Files-Upload
Von starfoxfs im Forum PHPAntworten: 8Letzter Beitrag: 12.02.10, 11:16 -
Frage zu Upload + Tutorial
Von Ich_halt224 im Forum PHPAntworten: 22Letzter Beitrag: 19.07.08, 09:10 -
Frage zum upload tutorial
Von matze1983 im Forum PHPAntworten: 7Letzter Beitrag: 30.10.07, 09:54 -
Upload frage
Von Malaxo im Forum PHPAntworten: 3Letzter Beitrag: 30.01.07, 08:36 -
upload-frage
Von dji im Forum PHPAntworten: 4Letzter Beitrag: 02.12.02, 09:38





Zitieren


Login






