How to develop database applications faster?
I started developing in C#. Is there any elegant solution for automatic
generating of forms based on the structure of the tables in (MSSQL) database
(database schema), and after that only making minor changes in generated
code for specific things.
Take for example some simple desktop (windows) database app with 30-50
tables. Most forms for entering data are similar and have some form of
DataGridView with buttons for Insert/Update/Delete/Sort/Filter/Print/...
Forms for Insert/Update have many fields and some buttons like OK and
Cancel.
Generating every new form from zero with form designer and drag and drop is
very hard. Even the old xBase tools had frameworks for automatic generating
of code for all forms (even the complex ones) with the need for only small
changes after. What I want to say is that using the form designer at all is
the step back.
How you people do this, make every new form from zero or have some kind of
automatism.
Petar Tag: online money making concepts Tag: 554203
Creating New Threads to Show a Splash and Login Screen
I am having a bit of a problem getting my application to work
properly.
RIght here is my problem...
WHen my C# windows app loads up the start form, i create a new thread
and show the splash on the new thread and put the main thread to sleep
until the splash screen has done the business, then i kill the new
thread and start another to show the login and again put the main one
to sleep. Problem i have is that my splash screen will show ie has
focus but when my login box appears it is minimised to the taskbar??
and doesnt show up on the screeen like i want it to.
Here is my Code:
//Load the Splash Screen
private void DoSplash()
{
Splash sp = new Splash();
DialogResult Res;
Res = sp.ShowDialog();
if (Res == DialogResult.Abort)
{
KillApp = true;
}
WakeThread = true;
}
//Here is my Login Form
private void ShowLogin()
{
Login lg = new Login();
DialogResult Res;
Res = lg.ShowDialog();
if (Res != DialogResult.OK)
{
KillApp = true;
}
WakeThread = true;
}
and finally my initial form constructor
//Show Splash Screen
Thread th = new Thread(new ThreadStart(DoSplash));
th.Start();
while (WakeThread == false)
{ Thread.Sleep(1000); }
th.Abort();
if (KillApp)
{ KillApplication(); }
//end of splash screen
//Show Login Box
WakeThread = false;
Thread thLogin = new Thread(new ThreadStart(ShowLogin));
thLogin.Start();
while (WakeThread == false)
{ Thread.Sleep(1000); }
thLogin.Abort();
if (KillApp)
{ KillApplication(); }
//end of Login
//GOOD TO GO.....
InitializeComponent();
Can anyone offer a suggestion to what i am doing wrong or if someone
has a better way of doing what im trying to then please let me know :)
Thanks Tag: online money making concepts Tag: 554200
Unicode values
I am not sure where to start on this.
Does someone have a code snippet which will wait for a keypress or
combination keypress & give me its utf8 value?
e.g
ESC // keypress
Ctrl + C // combination keypress
Thanks. Tag: online money making concepts Tag: 554194
Reg:Couldn't generate a report using Crystal Reports in
Hi
I couldn't generate any report.My application is developed using .Net(MDI Frame application-windows forms) and I am trying to generate the report but couldn't succeed.If I do the same funtionality as individual windows form application(not a MDI frame) I was able to generate the report.
I feel I am facing the problem with the below function.
ReportID = PEOpenPrintJob(ReportName);
This is not returning any value.I am sure the corresponding the report exist.
Please help in this. Tag: online money making concepts Tag: 554192
Regex Wildcard
I use .* as a wildcard match in my regular expression. But how do I
write it if I want to match all characters except the following <>
and / Tag: online money making concepts Tag: 554186
fundamental web services question
I have an asp page (please don't ask me why), I would like to consume
a .net web services. What is the best way to consume the web service?
Is it using com component or using vbscript? Could the experts shead
some light into this dark area for me?
Thanks always. Tag: online money making concepts Tag: 554184
Select XML Node
Using C# 3.5 I want to select a value from an XML file. The intent of the
following is to print "EpsilonGamma". It does not work. Can you point out
my probably very obvious error?
XmlDocument document = new XmlDocument();
document.Load("sample.xml");
XmlElement root = document.DocumentElement;
XmlNode node = root.SelectSingleNode("//menu[id=b]");
Console.Write( node.SelectSingleNode("//menu[id=b]/row[id=1]/vis").Value );
Console.Write( node.SelectSingleNode("//menu[id=b]/row[id=0]/vis").Value );
For ...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<menu>
<id>a</id>
<row>
<id>0</id>
<vis>Alpha</vis>
</row>
<row>
<id>1</id>
<vis>Beta</vis>
</row>
</menu>
<menu>
<id>b</id>
<row>
<id>0</id>
<vis>Gamma</vis>
</row>
<row>
<id>1</id>
<vis>Epsilon</vis>
</row>
</menu>
</menus>
... Thom
___________________________________________________
Thom Little - www.tlanet.net - Thom Little Associates, Ltd. Tag: online money making concepts Tag: 554155
IEnumerable objects are essentially arrays, right?
I've read the msdn doc about IEnumerable. It seems to me that
IEnumerable objects are essentially wrapped-up arrays. It simply gives
us the foreach convenience. Is this correct? Tag: online money making concepts Tag: 554146
DataGridView: Need to make Enter key create newline in textbox
I've got a full day invested in this now and I still can't make it work.
Hopefully someone here can offer some suggestions.
Here is the situation: I have a data entry application and am using a
DataGridView to enter order details. When it comes to the serial
numbers we will use a barcode reader which send a carriage return
character after each barcode is read. We can't change this behavior
(well, we can but it works great in the other 3-4 applications we use)
When a user is entering serial numbers into the serial number cell I
want each scanned serial number to be on it's own line, just like:
abc123
abc456
abc789
I'm able to get this behavior by pressing the SHIFT+ENTER combo but I
can't setup the barcode reader to send this combination.
The solution I've come up with (based on an article I found online
somewhere) is to create my own DGV Cell, Column and EditingControl.
Here is the code for those classes:
<code>
public class PMDDataGridViewTextBoxEditingControl :
DataGridViewTextBoxEditingControl
{
public override bool EditingControlWantsInputKey(Keys keyData, bool
dataGridViewWantsInputKey)
{
switch (keyData & Keys.KeyCode)
{
case Keys.Prior:
case Keys.Next:
case Keys.End:
case Keys.Home:
case Keys.Left:
case Keys.Up:
case Keys.Right:
case Keys.Down:
case Keys.Delete:
case Keys.Enter:
return true;
}
return base.EditingControlWantsInputKey(keyData,
dataGridViewWantsInputKey);
}
protected override void OnKeyDown(KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
this.Text += Environment.NewLine;
this.Select(this.Text.Length, 0);
}
base.OnKeyDown(e);
}
}
public class PMDMultilinDataGridViewCell : DataGridViewTextBoxCell
{
public override Type EditType
{
get
{
return typeof(PMDDataGridViewTextBoxEditingControl);
}
}
}
public class PMDMultilineDataGridViewColumn : DataGridViewColumn
{
public PMDMultilineDataGridViewColumn()
: base(new PMDMultilinDataGridViewCell())
{
this.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
}
}
</code>
Note that in the EditingControl I am inserting a newline and moving the
cursor to this newline when an enter key is detected.
My question (finally!) is if this is a sound solution? It works, but
feels "hacky" to me and I suspect I may be missing a more elegant solution.
Anyone have any ideas? Tag: online money making concepts Tag: 554137
How to determine console or winform app?
Hello, my app is written in C#. Given an app file path (e.g. e:\abc.exe),
how can I determine if it's a winform app or a console one. (note: abc.exe
can be either a native exe or a .net one) Tag: online money making concepts Tag: 554134
basic source code archiver
Hi,
I could do with a simple source code archiver
something that can save all source files,
and then save any changed source file,
but I dont realy want or need the
complexity of source code control.
at the moment I just zip the entire directory,
and save in numbered files, but theres a lot of large
files that arnt modified often such as 3d model objects.
thanks
Colin =^.^= Tag: online money making concepts Tag: 554132
Texture.FromBitmap is slow runing from debugger
Hi,
Ive written a 3dmodel editor, and it works fairly well
it harldy uses any cpu exept when its loading a texture from bitmap
in the debugger, at all other times it hardly uses any cpu
but from the debugger even in release mode it takes a second or so
to load a 65k texture, with a 2ghz pc this is 10k instructions per pixel !
I cant understand what its doing here, can anyone shed any light on this ?
I have the d3d debug turned off although this makes zero difference.
yet it stil manages to actually draw the animated model meshes with <1% cpu.
in multi viewports, also load and decode the 20mb or so of files in under 1
second.
im using ..
Bitmap bitmap
Texture.FromBitmap(Draw3dDevice.device, bitmap, Usage.Dynamic,
Pool.Default);
bitmap is generated from memory. this may be somethign to do with it,
but i cant think what,
as I dont think it was slow when I was laoding bitmaps another way.
thanks
Colin =^.^= Tag: online money making concepts Tag: 554131
dans commande acomplia en France corpus
dans commande acomplia en France corpus
acomplia belgique bon marche Sans Prescription
dans commande acomplia us usa corpus
achat acomplia canada
Achat acomplia canada france
+++ PERTE DE POIDS +++ PERTE DE POIDS +++ PERTE DE POIDS +++
+
ACHETER ACOMPLIA BON MARCHE (ALL CARD ACCEPTED)
http://jhku.net/ACHETER-ACOMPLIA-BON-MARCHE/
ACHETER ACOMPLIA BON MARCHE (Western Union, Diners, AMEX)
http://WWW.ACHETER-ACOMPLIA.TK/
+
+
+
ACHETER XENICAL BON MARCHE (ALL CARD ACCEPTED)
http://jhku.net/ACHETER-XENICAL-BON-MARCHE/
ACHETER XENICAL BON MARCHE (Western Union, Diners, AMEX)
http://WWW.ACHETER-XENICAL.TK/
+
+
+
ACHETER MERIDIA BON MARCHE (Western Union, Diners, AMEX, VISA)
http://WWW.ACHETER-MERIDIA.TK/
+
+
+
ACHETER PHENTERMINE BON MARCHE (Western Union, Diners, AMEX, VISA)
http://WWW.ACHETER-PHENTERMINE.TK/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
http://www.usonlinerx.net/order-levitra.html?affid=6138
http://www.buy-viagra-where.info/
http://www.topills.com/Generic-Viagra-ST.html?affid=6138
http://www.buy-albenza-generic.info
http://www.usonlinerx.net/order-viagra.html?affid=6138
acomplia suisse citrate de Rimonabant
acomplia aucune prescription
acomplia soft sans prescription
commander acomplia soft
Acheter acomplia canada en ligne sur internet
acheter acomplia bon marche en linge
Achetez acomplia canada
acomplia sur internet
acheter votre acomplia canada
acomplia suisse citrate de Rimonabant
acomplia belgique au rabais en ligne sans prescription
acheter acomplia en linge sans presription
PERTE DE POIDS
eurodrugs.org
acheter votre acomplia canada
acheter du acomplia
acomplia canada Generique Inde
eurodrugs.org
acomplia belgique sans ordonnance
acomplia Generique Inde
acomplia au rabais au Canada
acomplia belgique bon marche
un Achat de acomplia avec livraison
acomplia en France a vendre
Achat acomplia Simple
comprimes de acomplia bon marche
citrate de Rimonabant canada
acomplia canada bon marche
acomplia suisse au rabais au suisse
citrate de Rimonabant bon marche en France
dans commande acomplia canada corpus
acomplia canada bon marche Sans Prescription
Achat acomplia Pro
comprimes de acomplia canada
acomplia belgique citrate de Rimonabant
Achat acomplia Simple Tag: online money making concepts Tag: 554130
"Using" DirectX class libraries- newbie question
Sorry, stupid newbie question.
I have VS2008, and I downloaded and installed the DirectX SDK.
I want to access the DirectX classes from C#, but I can't see how to make C#
aware of them.
using Microsoft.DirectX.Direct3DX;
says the namespace doesn't exist.
How do I link so a C# program has access?
Thanks, Peter Webb Tag: online money making concepts Tag: 554121
Can't Post Online
Microsoft updated their website interface, and now I am no longer able to
post questions. I log in and get to the screen where I select New >
Question. The page refreshes, but the question window never appears. How do
I get the question window? My pop-up blockers (Google and IE7) have both
been disabled, and I am doing this from home and work (work has a proxy,
home does not). Tag: online money making concepts Tag: 554106
Console.ForegroundColor per thread getting jumbled.
lock (o)
{
Console.ForegroundColor =
(ConsoleColor)Enum.Parse(typeof(ConsoleColor),
Attributes["ConsoleColor"]);
Console.Write(message);
Console.ResetColor();
}
I hoped each thread would get it's own color based on an external
parameter that's set at load time. However, ocassionlly outputs means
to be in green are coming out in red and so on.
Any ideas? Tag: online money making concepts Tag: 554104
After upgrade to 2.0, Error CS1595 System.TimeSpan is defined in
I know I'm some years behind, but I just have the go-ahead to start
developing on .Net 2.0. While the development process goes ahead, I'm
to maintain the .Net 1.1 stuff on the same machine.
I downloaded and installed the 2.0 framework. As I understand it, 1.1
and 2.0 are supposed to play nice with each other. However, now when I
go about compiling a class using CSC.exe, I get this error (among
others):
---------------------
warning CS1595: 'System.TimeSpan' is defined in multiple places; using
definition from c:\WINDOWS\Microsoft.NET\Framework
\v1.1.4322\mscorlib.dll
---------------------
Despite "only" being a warning, the compilation doesn't seem to take,
such that the DLL is not produced.
I've done an exhaustive search on the machine for multiple
mscorlib.dll files. There are four, in these locations:
1) c:\I386\netfx.cab
2) c:\windows\servicepackfiles\i386
3) c:\windows\Microsoft.Net\framework\v.1.1.4322
4) c:\windows\Microsoft.Net\framework\v.2.0.50717
If necessary, I will uninstall 2.0. That will probably fix it. Short
of that, however, is there any other solution?
Thanks for any pointers.
--Brent Tag: online money making concepts Tag: 554099
On-Screen keyboard: how is it done?
Hi Experts:
I saw an PC without keyboard attached, it uses an on-screen keyboard
software program. When user clicks on a "key" (a button) on the program, the
program can find the currently active (focused) window application (for
example, notepad.exe) and input "typed" key into that active program; but
the keyboard program itself seems did not get activated while user click on
a button on it.
I could not figure out how it is accomplished? How does the keyboard program
avoid getting focus (active) even when user click on a "key" button of the
program? It must be able to do so in order to find the currently active
Windows program that user is working with (etc, a notepad.exe).
Thanks for your thoughts in advance.
Polaris Tag: online money making concepts Tag: 554095
VS2008 and Webservice
Hi,
I am trying to develop a webservice and an aspx client on a Win2003
server box. The IDE is VS2008.
The thing just seems totally flaky.
Webservice compiles and publishes with no errors.
Access the Service with http://localhost:2092/EasyVend0r.asmx (Note
using the port assigned by the IDE)
and no problem.
But start a browser and go to access the ASMX with the published URL
of http:localhost//EasyVend0r.asmx and you get
Parser Error Message: Could not create type 'EasyVend0r.EasyVend0r'.
Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind="EasyVend0r.asmx.cs"
Class="EasyVend0r.EasyVend0r" %>
Getting similar errors when trying to access the aspx client page.
Basically as long as you stay in the IDE or use the port that the IDE
has assigned you can view the asmx and aspx
Go outside and the wheels fall off.
I am not a web developer so I am probably missing some fundamental
step.
But it is annoying that everything seems to deploy OK according to the
IDE but the browser is unhappy with the 'published' i.e. Unspecified
port result.
I don't remember grief like this with VS2005
Any clues as to what I am doing wrong?
Thanks
Bob Tag: online money making concepts Tag: 554087
Check if a Public Method exists for a form and execute it
I need a way to do the following and cannot seem to find a solution via
google.
1. Have a method from the main app to get all open forms
2. Check each open form for a public method
3. If this public method exists execute it which will result in the
displayed form being updated. There will be no data loss as the forms
will only contain listviews or readonly fields.
Regards
Jeff Tag: online money making concepts Tag: 554082
What happened to CF_RTFNOOBJS and CF_RTF and CF_RETEXTOBJ
Before DotNet there were the formats:
// Clipboard formats - use as parameter to RegisterClipboardFormat()
#define CF_RTF TEXT("Rich Text Format")
#define CF_RTFNOOBJS TEXT("Rich Text Format Without Objects")
#define CF_RETEXTOBJ TEXT("RichEdit Text and Objects")
Are they still used by any MS programs like Word or WordPad?
If they are how are they handled by DotNET?
Thanks Tag: online money making concepts Tag: 554073
Stop XmlDocument.Load() from using cached data?
Is there any way to stop an XmlDocument object from using data grabbed
from a previous request?
e.g. if I used XmlDocument.Load to grab a URI, and I know that this
URI changes often (for example, an RSS feed) can I somehow tell the
framework to not use cached data?
Will I have to create a custom HttpWebRequest and convert the data to
an XmlDocument for processing or is there some way to tell XmlDocument
(perhaps via the XmlResolver somehow?) to never use the cache?
Thanks. Tag: online money making concepts Tag: 554068
SaveFileDialog Changing Environment.CurrentDirectory
Hello:
Correct me if I'm wrong, but it appears that saving a file with the
SaveFileDialog changes the Environment.CurrentDirectory property.
How can I prevent this?
Thanks,
Travis Tag: online money making concepts Tag: 554057
Windows Service Installation With Visual Studio 2008
I have a Windows service that I wrote with Visual Studio 2008, and I would
like to create a deployment file for my client.
There used to be an option "Add Installer" in the properties window when I
created the service, which apparently has been moved or removed. I looked
for new instructions to install services with VS 2008, but I don't see them
on the web.
Can anyone point me to the right place to be able to accomplish this? I
tried the installer class, but I don't see how to get that to install my
service as a service.
In case it matters, our client is still using the .NET 2.0 framework, so
that's what I'm developing with.
Thanks,
Steve
--
My BizTalk blog:
http://stevestechnotes.blogspot.com/ Tag: online money making concepts Tag: 554048
Opacity on MDI Child Form
Hi all
I have a MDI Container with a Form as MDI Child.
Now I want to set the Opacity on this child form
but it does not work ...
Does somebody know how to do this ??
Thanks for any comments
Regards
Frank Uray Tag: online money making concepts Tag: 554037
simple logging in a C# COM DLL
I have created a very simple C# class library (DLL).
I have ticked the "Register for COM interop" option in the project
properties dialog.
I have made the [assembly: ComVisible(true)] in the AssemblyInfo.cs file.
I can call a public method in this library from VBScript.
So far so good, now I'd like to have some very *simple* loggging capability.
For other applications I've gone down the [log4net] route and rolled by own
loggers etc...etc.
For this tiny DLL, I'd like to have for example the option to just drop a
[myDll.dll.config] file into the same directory as the DLL and add a trace
listener that outputs to a file or optionally roll my own trace listener
(i.e. udp).
I've successfully done things with trace listeners, but cannot get the DLL
to pick up the custom trace listener config file.
I've tried various names for the config file, but no joy.
Any suggestions?
Is it because I'm calling it from a VBScript file and not a .NET application? Tag: online money making concepts Tag: 554036
Threads and Exceptions
I am trying to use a ssh stream reader that has no timeout method. It
simply watches the stream until an escape character appears in the
stream. It then returns the contents of the buffer. Thus, when the
server never responds to a read action (no escape character appears in
the stream), the program appears hung while the thread is waiting for
a stream character that never comes.
To solve this, I issue the stream read inside of a 'try' block with a
catch for a custom exception. Just before the call to the stream
reader, I launch a watchdog function with its own thread. The watchdog
sleeps for 3 seconds and then checks the buffer (passed in by
reference) to see if it is still empty. If it is empty, it throws the
customer exception and pulls the main thread back to the catch portion
of the try.
This sounds good, but isn't working. When the exception throws in the
watchdog thread, it is treated like an unhandled exception even tho
the thread was launched from inside of a 'try' that has an explicit
handler for that exception.
In the code snippet below, as part of my efforts to figure this out, I
have the watchdog throw an exception for either condition of the read
stream. If the stream has something in it, one exception is thrown,
and if the stream buffer is still empty another exception is thrown.
Again, both are treated as unhandled even tho the function was launced
with its own thread from inside the 'try' block.
How can I get these exceptions to be handled by the 'try' block catch
blocks?
Dave
snippet:
try
{
Thread thd_watchdog = new Thread(delegate()
{ Read_Watchdog(ref response, 200); });
thd_watchdog.Start();
response = ssh.ReadResponse();
}
catch (ExpireException)
{ return "Error opening SSH stream to " + proxyServer; }
catch (ClearException)
{ return "Success opening SSH stream to " +
proxyServer; }
private ParameterizedThreadStart Read_Watchdog(ref string response,
int i_timer)
{
Thread.Sleep(i_timer);
if (response.Length > 0)
throw new ClearException();
else
throw new ExpireException();
} Tag: online money making concepts Tag: 554030
CHINA WHOLESALE THROW JERSEY WOMEN 'S JERSEY THROWBACK 2008 NFL
--------------------WWW.JERSEYNFLSTORE.CN---------------------
jersey,supply,NFL,MLB,NBA,NHL SuperBowl NFL jersey from wholesale NFL
NBA MLB NHL Jerseys.Soccer Jersey china supplier,nlf NBA Jersey Tag: online money making concepts Tag: 554020
inherited class instead of expected class in interface implementation
Why should the following not compile? ( it does not)
interface ISomething
{
Apples a {get;set;}
}
public class ChilieanApples:Apples
{
}
public class Apples
{
}
Class SomethingSpecific:ISomething
{
public ChilieanApples apples {get;set;}
} Tag: online money making concepts Tag: 554019
How best can I create a panel which allows zoom on a drawing?
I would like to create a panel, or other widget, on which I can draw,
say, a triangle, and use the wheel on the mouse to zoom in and out on
the drawing. A vector drawing.
I know this can be done because I have seen apps that do this. They
were 3D and I only need 2D but they were very fast.
Is there an easy way to do this? Do I need to use the DirectX
libraries to do this?
Any pointer in the right direction would be very welcome and hopefully
save me much time.
Thanks,
Steve Tag: online money making concepts Tag: 554012
Using a namespace between 2 partial classes
im using c# vs2008
is it possible to define two partial classes in two different named
code modules in this case the class and its attched designer class,
and have a using statement at the top of the main class that allows
access to a 3rd class/control/dll etc etc
if i have the using statment at the top of the main class is it
possible to have that using statement used in a partial class there,
and have the using statment propogate through to the partial class in
the designer code that is auto generated, so that referenced objects
can also be called by code in the designer
thanks for any insight or help
Peted Tag: online money making concepts Tag: 554008
[c# 2008] color rows of datagridview
Hi,
i create aprogram that load a table from Access DB.
i want color rows with different color but when i run the program and
i load the datagridview the first time, the rows are white!
only when i insert a new record the rows change color, why?
thanks to all!
bye Tag: online money making concepts Tag: 554003
Evaluating numeric expressions
Is there an easy way in C# to take a string that contains an expression, say
for example something like '(10 / 2) + 1' and evaluate it without having to
parse the string myself and muck about with other stuff like operator
precedence? Tag: online money making concepts Tag: 554001
Exception Handling
In my development environment when an error is raised in my Buiness Layer I
rethrow the exception and the message of he Exception is displayed.
For example : Cannot Update where Record Status is Closed is displayed.
Record ID 369448
When I deploy my app to both the System Test and UAT environments the user
gets below :
-- System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.Exception: Error: Cannot Update where Record Status is
Closed'. Record ID 369448 at FCS.FinesBL.CreateFine(XmlDocument FinesXML) ---
End of inner exception stack trace ---
Anyone know why the extra exception details are displayed in System Test and
UAT and not in or development environment?
I am baffled. Tag: online money making concepts Tag: 553999
What is Select Command in Retrieving Time
Hi and Hello.
Good Day.
I have a problem in retrieving time in database. I have Table name "SAMPLE"
and have field name "DATES"
DATES
-------------------------------------|
5/9/2008 1:48:06 PM |
--------------------------------------
* If I will retrive only a date my select command is:
Select convert(nvarchar,Dates,101) as Dates from Sample
OUTPUT: Only the Date 5/9/2008.
My problem is what is the select command to retrieve only the time like the
above data.
I want the output only like this: 1:48:06 PM
Thank you in advance.
--
To be Happy is To be Yourself Tag: online money making concepts Tag: 553998
What classes do I use to create a web proxy
Firstly let me be very clear about this, I do not want to create a web
service proxy nor do I want to do anything with web services.
Basically, I have a shrink wrapped desktop application which downloads
data from a web site. Unfortunately the application has a fixed
timeout and the web server regularly exceeds this, causing the
application to shut the connection and subsequently not receive any
data. The desktop application also uploads data to the web server but
this does not suffer from timeout problems.
Changing the desktop or web serve application is not an option.
So I need to create a lightweight proxy that can sit between the
desktop and web server applications. The proxy needs to operate in 3
modes. The 1st mode would download the data from the web server to
persistent storage and the 2nd mode of the proxy would serve this data
from persistent storage to the desktop application. To complicate
matters a little more, the 3rd mode must be able to operate as a
transparent proxy, merely accepting the data fromthe desktop
application and passing it on to the web server.
So I think that I simply need to be able to request the data from the
web server and provide a web server interface to the desktop
application. I know how to do this quickly in Java but have no idea
where to start with dotnet. The documentation in MSDN is somewhat
overwhelming at the moment.
Can anyone please give me a pointer to the classes that I would need
to do this. Of course I may also be off target here, so if I need to
use Visual C++ instead of C#, then please point that out.
TIA, Peter Tag: online money making concepts Tag: 553997
Attach a listener to the IsMouseOver property
In a wpf app using c#, is it possible to somehow attach a listener or hook
into the IsMouseOver property so when ever it's value changes, a method
could be notified?
--
moondaddy@newsgroup.nospam Tag: online money making concepts Tag: 553994
Formatting a column in a datagridview to currency
I am using this code at the moment to format the column
this.itemsDataGrid.Columns["Amount"].DefaultCellStyle.Format = "c";
but i get the error "Object reference not set to an instance of an
object. " is this code incorrect ?
Any suggestions please Tag: online money making concepts Tag: 553989
Excel 2007 Automation Question
What I want to do is bring data into an excel 2007 worksheet that is stored
in a sql database table.
The idea is to parameterize the "where" clause in the sql select statement
limiting the result set.
There are lots of examples in the literature with regard to bringing in data
stored in cubes --- but not so much from data in sql table.
The basic issue is I want bring in descriptive information about say a
contract (things like description, signing date, etc). Cubes which most
(all) of the literature deals with are dealing with aggregations of amounts
or "measures" and not so much about descriptions.
As always all suggestions are welcome.
Mark Tag: online money making concepts Tag: 553973
How to access a run time generated PictureBox on the form
In C# on Form1 I genetate an array of PictureBoxes and populate each with an
image as seen in the code below.
Later on I want to access a specific PictureBox to change its image, but I
keep getting the error "The name 'PictureBox1' does not exist in the current
context"
The code I use to try to access the PictureBox is "PictureBox1[Target].Image
= HoldBitMap; " where kount is an integer.
I know the answer is probably in using the Controls collection but I can't
get the syntax correct.
Thanks in advance for your help.
Jim
private void InitializePictureBox()
{
//allocate the picture box
PictureBox[] PictureBox1 = new PictureBox[1000];
int i;
int j;
int kount = 0;
Random randObj = new Random(unchecked((int)
(DateTime.Now.Ticks)));
//initialise each picture box
for(i=0; i<8; i++)
{
for (j = 0; j < 6; j++)
{
PictureBox1[kount] = new PictureBox();
// Set the location and size of the PictureBox control.
PictureBox1[kount].Location = new
System.Drawing.Point(100 * i, 100 * j);
PictureBox1[kount].Size = new System.Drawing.Size(99,
99);
PictureBox1[kount].TabStop = false;
// Set the SizeMode property to the StretchImage value.
This
// will shrink or enlarge the image as needed to fit
into
// the PictureBox.
PictureBox1[kount].SizeMode = PictureBoxSizeMode.Zoom;
// .StretchImage;
// Set the border style to a three-dimensional border.
PictureBox1[kount].BorderStyle = BorderStyle.Fixed3D;
//Wire the picture boxes click to new common click
handler.
PictureBox1[kount].Click += new
System.EventHandler(ClickHandler);
PictureBox1[kount].Tag = kount;
// Add the PictureBox to the form.
Controls.Add(PictureBox1[kount]);
// Add the image
PictureBox1[kount].Image = MakeBitMap();
kount++;
}
}
} Tag: online money making concepts Tag: 553969
Mime Type of a file
Thanks in advance for everyone's help...
My problem is that more often than I would like, I get attachments
that for some reason or another do not include an extension. What I
want to do is create a C# app that based on a file on my hard drive
that I specify, will spit back to me the mime type. I can do the rest
from there.
I have looked, and looked and looked a little more for a way to
determine the type of a file that does not rely on the extension. So
far I have come up with next to nothing - a couple libraries that do
this but that's not what I'm looking for. I don't want to use a whole
extra just to find out what kind of file I have.
To clarify what I'm looking for, PHP has similar functionality using
the FileInfo class. Simple, easy and to the point. Does nothing like
this exist in C#? I have looked at different class on MSDN and
searched Google relentlessly but, I got nothing. I read something
about the Attachment class but I was having problems following the
documentation I found for it.
I have provided a general outline for the code I am looking for. Feel
free to correct me if my request is semi-outrageous.
myFile = "C:\screw-the-extension"
myFileObject = new File(myFile)
print myFileObject.MimeType
Any help is more than appreciated. Tag: online money making concepts Tag: 553968
Using MS SQL Express in my C# App
I'm writing my first app that uses SQL Express to store a bunch of user
data (vice using a simple txt file, etc.), but I have a question that
you guys who've been doing this a while will probably laugh at.
Once I've completed my app, will I have to ship SQL Express with my app
in order for people to use my program?
Todd Tag: online money making concepts Tag: 553966
Send cookie with WebRequest
I'm sending data to a website with a WebRequest,
string m_request = some_web_page;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(m_request );
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Which works fine, but I need to set and send a cookie with the WebRequest.
How do I do that? Tag: online money making concepts Tag: 553962
Send cookie with WebRequest
string m_request = some_web_page;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(m_request );
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Which works fine, but I need to set and send a cookie with the WebRequest.
How do I do that? Tag: online money making concepts Tag: 553961